Sunteți pe pagina 1din 2

ibm m qadm in-m adhu.blo gspo t .

in

http://ibmmqadmin-madhu.blo gspo t.in/2012/09/message-types.html

What Is Message & Types Of Messages


Madhu K (IBM MQ Certified Pro fessio nal) (Mo bile:7893751171/7382511856) (Email: mailme.mq@gmail.co m) (Call fo r
Online/Offline Training)

Message:
What is Message and types of message ?
In message queuing, a message is a collection of data sent by one program and intended f or
another program.
WebSphere MQ Predefined message types are:
Data Gram : A simple message f or which no reply is expected
Use a datagram when you do not require a reply f rom the application that receives the message (that
is, gets the message f rom the queue).
An example of an application that could use data grams is one that displays f light inf ormation in an
airport lounge.A message could contain the data f or a whole screen of f light inf ormation.Such an
application is unlikely to request an acknowledgement f or a message because it probably does not
matter if a message is not delivered.
T he application sends an update message af ter a short period of time.
Request : A message f or which a reply is expected
Use a request message when you want a reply f rom the application that receives the message.
An example of an application that could use request messages is one that displays the balance of a
checking account.T he request message could contain the number of the account, and the reply
message would contain the account balance.
Reply : A reply to a request message
Report : A message that describes an event such as the occurrence of an error
A conf irmation of arrival (COA) report message. T his indicates that the message has reached its
target queue. It is generated by the queue manager.
A conf irmation of delivery (COD) report message. T his indicates that the message has been
retrieved by a receiving application. It is generated by the queue manager.
Applications can use the f irst three types of messages to pass inf ormation between themselves.
T he f ourth type, report, is f or applications and queue managers to use to report inf ormation about
events such as the occurrence of an error.
You can also def ine your own types of message
What is Message Persistence ?
Persistent messages are written to logs and queue data f iles.
If a queue manager is restarted af ter a f ailure, it recovers these persistent messages as necessary
f rom the logged data.
Messages that are not persistent are discarded if a queue manager stops, whether the stoppage is
as a result of an operator command or because of the f ailure of some part of your system.

When you create a message, if you initialize the message descriptor (MQMD) using the def aults, the
persistence f or the message is taken f rom the Def Persistence attribute of the queue specif ied in the
MQOPEN command. Alternatively, you can set the persistence of the message using the Persistence
f ield of the MQMD structure to def ine the message as persistent or nonpersistent.
T he perf ormance of your application is af f ected when you use persistent messages.
A persistent message, outside the current unit of work, is written to disk on every put and get
operation.
A persistent message within the current unit of work is logged only when the unit of work is
committed.
Nonpersistent messages can be used f or f ast messaging.

S-ar putea să vă placă și