Message persistence
Persistent messages are written to logs and queue data files. If a queue manager is restarted after a failure, it recovers these persistent messages as necessary from 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 failure of some part of your system. Nonpersistent messages for WebSphere MQ for z/OS stored in a coupling facility (CF) are an exception to this. They persist as long as the CF remains available.
When you create a message, if you initialize the message descriptor (MQMD) using the defaults, the persistence for the message is taken from the DefPersistence attribute of the queue specified in the MQOPEN command. Alternatively, we can set the persistence of the message using the Persistence field of the MQMD structure to define the message as persistent or nonpersistent.
The performance of your application is affected when you use persistent messages; the extent of the effect depends on the performance characteristics of the machine’s I/O subsystem and how you use the syncpoint options on each platform:
- A persistent message, outside the current unit of work, is written to disk on every put and get operation. See Committing and backing out units of work.
- In WebSphere MQ on UNIX systems, WebSphere MQ for z/OS, and WebSphere MQ for Windows, a persistent message within the current unit of work is logged only when the unit of work is committed (and the unit of work could contain many queue operations).
Nonpersistent messages can be used for fast messaging. See the Application Programming Reference and WebSphere MQ Intercommunications for further information about fast messages.
Parent topic:
WebSphere MQ messages
fg10810_