Without setting the proper MQPMO / MQGMO options your MQ queues might begin to look like this.
When creating a connection to MQ in DataPower, sometimes there is a need for fine-grained control over how the messages on the queue should behave.
If you see weird behaviour in your queue then you may need to play with the MQ Get Message Options (MQGMO) or the MQ Put Message Options (MQPMO) defined on the connection. ‘Weird behaviour’ can include situations where successfully processed messages reappear in the source queue after a period of time (this is generally due to MQ sync point issues).
I’ve found it difficult to find a table that defines the meaning for the allowed values. The DataPower documentation only refers to the fact that they can be set and does not define the meaning of each attribute. For that reason, I’ve included them below from my research.
MQ Get Message Options (MQGMO)
Individual attribute documentation: Get Message Options
MQ Put Message Options (MQPMO)
Individual attribute documentation: Put Message Options
If you notice the values for PMO and GMO, they are all powers of 2. This happens because each option is a flag representing the option at the nth bit.
In order to enable multiple message options, simply add the values of the desired options together. For example, to enable both MQGMO-NO-SYNCPOINT and MQGMO-NO-WAIT simply add the values together and use the sum as the property value.
Using MQPMO and MQGMO
PMO and GMO are set by DataPower anytime a connection to an MQ Queue Manger to put or get a message from a queue is needed. In general, they are found as query string parameters on the URL. For example:
In the case of GMO for an MQ Front Side Handler, there is an attribute named ‘Get Message Options’ where the value is used. The default value is 1: MQGMO-WAIT.
MQGMO & MQPMO are used to set special properties on the consumption of messages from MQ Queues. Ensure that you are familiar with these options when using MQ and you will avoid having to spend time debugging ‘weird’ behaviour.
Share this Post