Storing messages in the recovery database

To minimize any possibility of losing messages before they are stored in the recovery database, set the MQGMO_SYNCPOINT Get Msg option. Set this to tell the Queue Manager to lock the messages that are read. Then, set it to wait to delete these messages until the Commit, MQCMIT, function is called. The Commit function is not called until the number of messages, specified under COMMITINTERVAL for the Queue Manager, are put into the recovery database.

There is a possibility of the system failing after messages are committed to the recovery database and before the WebSphere MQ Commit function is called. In this case, when operation is resumed, some of the messages in the WebSphere MQ inbound queue are duplicates. They are duplicates of ones that were already stored in the recovery database. If the message IDs, not necessarily Websphere MQ message IDs, are checked before storage in the recovery database, then duplication is avoided. Message ID checking can be performed within a Tcl procedure.

See Open, Close, Get Message and Put Message options.