1
votes

Question:

Is it possible to copy MQ Messages from one Queue Manager/Queue to a different Queue Manager/Queue?

Scenario:

I have a "PROD" Queue Manager and when it receives a Message on it's Queues I would like to "copy" the Message to a queue on a "TEST" Queue Manager.

Requirements

  • The original message must be left on the PROD queue to be processed as normal.
  • This must be an automated process (lots of messages during a day). I could not intervene on a Message by Message basis.
  • If at all possible I would like this to be implemented by some native MQ functionality rather than an ad hoc program/script.
  • The copying must be as near to real time as possible
  • Must work with MQ version is 7.0.2.1(!). This cannot be changed.
  • Must run on Red Hat Enterprise Linux Server release 5.11 (Tikanga). Again, can't be changed.

I'm no MQ expert so use small words please

Thanks in advance

2

2 Answers

1
votes

The only problem with the technote pointed out by gouda is that MQ will modify/changed the MsgId and CorrelId of each message replicated.

If the MsgId and/or CorrelId fields are important then the only other option is an MQ API Exit that replicates the message. You may need a commercial product like MQ Message Replication.

The next question is how are you going to move the message from a PROD queue to a TEST queue? You definitely do NOT want to create channels between a PROD queue manager and a TEST queue manager.

There are lots of tools that can off offload PROD messages to a file then you can move the file to your TEST environment and then load the messages into a TEST queue. Here is a list of MQ tools that can do it. The 2 tools you should try out are: MQ Batch Toolkit and QLoad.

Personally, I would create a schedule task (CRONTAB) to be run every night at midnight to off the messages and I would make the filename include the date and time. The last steps of the script would be to zip/compress the file and delete the original file (because the data you offload could be massive).

Hence, any time you want a particular day's PROD messages, just copy the file to your TEST server and unzip/uncompress it and load it into the queue.

1
votes

all you need is mqadmin staff and this technote