Rinak
Rinak

Reputation: 147

Getting mqrc 2080 while trying to browse messages in DLQ

I'm trying to browse messages in a DLQ and I get the 2080 error.

Please share your expertise on this issue.

1:root@hostname:/root # ./amqsbcg SYSTEM.DEAD.LETTER.QUEUE QM.ABCDEFG

AMQSBCG0 - starts here
**********************

 MQOPEN - 'SYSTEM.DEAD.LETTER.QUEUE'

 MQGET 1, failed with CompCode:1 Reason:2080
 MQCLOSE
 MQDISC1:root@hostname:/root # mqrc 2080

      2080  0x00000820  MQRC_TRUNCATED_MSG_FAILED

Upvotes: 0

Views: 2797

Answers (2)

Morag Hughson
Morag Hughson

Reputation: 7525

Try the dmpmqmsg utility that comes with MQ V8 and above.

The following invocation as an example...

dmpmqmsg -m QM.ABCDEFG -i SYSTEM.DEAD.LETTER.QUEUE -f myfile.txt

This will give you a hex dump of the message after the MQMD is dumped out. amqsbcg would also only give you a hex dump of the message, so in both cases you are still going to have to pick your DLQ reason code out from the hex message.

Upvotes: 1

Roger
Roger

Reputation: 7476

amqsbcg is a sample MQ program that is included with MQ when you install the development tools. The source for amqsbcg (amqsbcg0.c) is located in the /opt/mqm/samp/ directory.

If you look at the source, you will see on line # 137:

#define    BUFFERLENGTH  65536  /* Max length of message accepted */

Therefore, any message larger than 65536 bytes will cause MQ to return RC of 2080 (MQRC_TRUNCATED_MSG_FAILED) which your messages appear to be larger than 65536 bytes.

Therefore, you have some choices:

  1. Take a copy of amqsbcg0.c, update it with a larger value, compile & link it
  2. Use the browse feature of MQ Explorer
  3. Use a vendor tool like MQ Visual Edit to view the Dead Letter Queue.

Upvotes: 0

Related Questions