Copy message from one queue to another – IBM MQ

As an MQ administrator, you typically want to repeat the messages from one queue to a different queue for troubleshooting.

Use dmpmqmsg to repeat the MQ message

Copying messages from one queue to a different is feasible with a built-in program known as dmpmqmsg in IBM MQ8. On this article I clarify how to try this.

Situation – copy a message from LOCAL.Q1 to LOCAL.Q2 in CHANDAN.QMGR

I now have one message in LOCAL.Q1

dis ql(LOCAL.Q1) curdepth
1 : dis ql(LOCAL.Q1) curdepth
AMQ8409: Show Queue particulars.
   QUEUE(LOCAL.Q1)                         TYPE(QLOCAL)
   CURDEPTH(1)

To repeat, I’ll use dmpmqmsg program.

dmpmqmsg –m QMGR –i SOURCE.QUEUE –o TARGET.QUEUE
-bash-4.2$ ./dmpmqmsg -m CHANDAN.QMGR -i LOCAL.Q1 -o LOCAL.Q2

5724-H72 (C) Copyright IBM Corp. 1994, 2015.
WebSphere MQ Queue Load/Unload Utility
Learn   - Information: 0 Messages:     1 Bytes:       39
Written - Information:   0 Messages:     1 Bytes:       39
-bash-4.2$

The message is copied from LOCAL.Q1 to LOCAL.Q2.

Let’s confirm them.

dis ql(LOCAL.Q2) curdepth
     1 : dis ql(LOCAL.Q2) curdepth
AMQ8409: Show Queue particulars.
   QUEUE(LOCAL.Q2)                         TYPE(QLOCAL)
   CURDEPTH(1)

So you’ll be able to see that the message has now been copied to LOCAL.Q2.

Leave a Comment

porno izle altyazılı porno porno