Don't ever lose essential data... Make your messages persistent.
RichardHamilton 060001RC0R Visits (3167)
The WebSphere MQ message persistence setting determines if a message survives system failures or a queue manager restart. The persistence attribute can be set in the message descriptor by the putting application, or is can be set using the default persistence attribute of the queue. After the message persistence is set, it retains that setting for the life of the message.
The persistence settings are:
By default, message persistence is set to MQPE
It's worth repeating because this is key... The persistence setting for the message is taken from the DefPersistence attribute of the queue specified on the MQOPEN API call. That could be one of several different types of queues: alias queue, remote queue, model queue, and so on. If you do nothing, then all of your messages will be "not persistent".
I suggest that the putting application always set the persistence attribute. Message data that is essential to your business should always be persistent. Set the persistence field of the MQMD structure to MQPER_PERSISTENT, and your messages are logged. The queue manager can recover persistent messages from the logged data, and your messages will survive system failures or a queue manager restart. Note that logging reduces the performance of your application, so you should use persistent messages for essential data only.
The queue attribute NPMCLASS (HIGH) can prevent non-persistent messages from being lost at restart. If you have a controlled, orderly, or immediate shutdown, then the queue manager writes the non-persistent messages to the queue file. These messages are recovered after a subsequent queue manager restart. But, if a queue manager ends abruptly, then the non-persistent messages are not written to disk at shutdown, and they can not be recovered at queue manager restart.
Diagnostic hints and tips:
MQPER_PERSISTENT 1 X'00000001'