Another New Feature being added to MQMR

A customer requested a new feature be added to MQ Message Replication (MQMR).

A quick comment about MQMR: MQMR does not alter the original message and/or the path to the destination queue. Think of MQ as a highway and MQMR is standing at the side of the highway taking a picture of each car (aka message) as they pass by. MQMR uses this ‘picture’ to create a replicated message and then put the replicated message to the target queue(s).

A customer wants to replicate the ‘Reply’ messages for messages in a Request / Reply scenario. Nothing interesting about that feature request except their ‘Reply’ messages have the MQMD Report Options field set to MQRO_COA + MQRO_COD. For the replicated messages, they want the COA and COD values to be cleared from the Report Options field. They have an SLA system to track the COA and COD messages. Therefore, if the Report Options field of the replicated message is not cleared of COA and COD value then their SLA would receive COA and COD from both the (original) ‘Reply’ message and the replicated Reply message. Not good.

At first I thought I would model this new feature after another requested feature (setting a value for the Expiry field of MQMD). After reviewing the design of handling 23 Report Option string values, parsing them, converting to integers and then processing, it would be a lot of code for very little benefit (plus more chances of bugs). So, I decided to go with individual flags: ClearRO, ClearROException, ClearROExpiration, ClearROCOA, ClearROCOD, ClearROPAN & ClearRONAN. I like the KISS principle.

Example #1: If the ClearRO flag is set (ClearRO = Y) then the other ClearRO*** flags are ignored and MQMD Report Options field will be set to MQRO_NONE.

Example #2: If the ClearROCOA flag is set (ClearROCOA = Y) then the MQMD Report Options field will be logically ANDed with 0xFFFFF8FF. This will remove MQRO_COA, MQRO_COA_WITH_DATA and MQRO_COA_WITH_FULL_DATA values from the Report Options field. The same idea will be used for the other ClearRO*** flags.

Of course, thinking about COA and COD messages got me thinking about what if a customer setup MQMR to replicate messages of a queue that receives application (i.e. Request or Reply), COA and COD messages. Maybe they would want to only replicate application messages and not COA and COD messages. So, I figured it would be good to add individual flags to tell MQMR to skip messages based on certain MQMD Feedback values: SkipCOA, SkipCOD, SkipExpiration, SkipPAN & SkipNAN.

If you would like to try out the new feature then send an email to and we will send you the latest release of MQMR.

Roger Lacroix
Capitalware Inc.

This entry was posted in Capitalware, IBM i (OS/400), Linux, MQ, MQ Message Replication, Unix, Windows.

Leave a Reply

Your email address will not be published. Required fields are marked *