Introduction

MQ Message Manager utility has several features to manage MQ Queue Messages. it contains various options such as display, copy, delete, put, filter, export messages of an MQ Queue.

The tool is useful for MQ Administrators, and Developers.

It will run on Windows, and Linux.

Installation
Extract files from the compressed zip file provided.

Configuration
File: /properties/MessageManager.props, this file contains predefined Queue Manager configuration segments. You can define several Queue Managers configurations here.

Examples;
# HOST DEFINITIONS
QM1_HOST=127.0.0.1
QM1_PORT=1414
QM1_SVRCONN=SYSTEM.DEF.SVRCONN
QM1_DEFAULT_QNAME=V2R.WBI.ERROR
QM1_MQUSER=
QM1_MQUSERPASS=
QM1_SSL=N
QM1_SSL_CHIP_SUITE=SSL_RSA_WITH_RC4_128_MD5
QM1_SSL_TRUSTSTORE=
QM1_SSL_TRUSTPASS=
QM1_SSL_KEYSTORE=
QM1_SSL_KEYPASS=

QM2_HOST=127.0.0.1
QM2_PORT=1421
QM2_SVRCONN=TEST.SVRCONN
QM2_DEFAULT_QNAME=V2R.WBI.ERROR
QM2_MQUSER=
QM2_MQUSERPASS=
QM2_SSL=Y
QM2_SSL_CHIP_SUITE=SSL_RSA_WITH_RC4_128_MD5
QM2_SSL_TRUSTSTORE=C:/IBM/WebSphereMQ/Qmgrs/TEST3/ssl/keyStore
QM2_SSL_TRUSTPASS=test01
QM2_SSL_KEYSTORE=C:/IBM/WebSphereMQ/Qmgrs/TEST3/ssl/keyStore
QM2_SSL_KEYPASS=test01

Running
cd your_install_dir
java -jar -Xms256m -Xmx1024m msgmanager.jar

You can choose the pre-configured Queue Manager from the Queue Manager drop down (or) you can enter a different Queue Manager configuration manually.

To display from messages from your local queue manager, you just need to enter Queue Manager Name, and Host Name.

Starting Msg#: To retrieve by message index.
Retrieve#Rows: number of messages to be retrieved
Convert CCSID?: To convert message data to current locale, for example from EBCDIC.
Go Button: To retrieve messages from a Queue. By default, 100 messages will be retrieved from a Queue, use “Retrieve#Rows” to change the count.
Put Message Button: To write messages to a Queue.
Show Q’s Button: To load Queue Names of a Queue Manager into the ComboBox list.

Right click on the retrieved message to display different options available to manage the message.

Select All
This option will highlight all the displayed messages
Write to File
Write selected messages to an output file without the MQ headers. You will have the option to write to single file, or multiple files if selected multiple messages.
Write to File w/Headers
Output complete MQ Message(s) with the MQ headers to file. You will have the option to write to single file, or multiple files if selected multiple messages.

Delete Selected
Delete one or more messages from the Queue provided your ID has delete access to the Queue.
Delete All
Delete all messages from the Queue provided your ID has delete access to the Queue.
Download Messages
To download the entire Q of messages to a file.
Clear Queue
To purge the Queue data.

Copy to Queue
To copy messages from one Queue to another to the same or a different queue manager.

Resubmit
Ability to resubmit message back to the input Queue that the message was originally processed from. Especially useful when dealing with WBI Adapters. For example, you can process the adapter “Failed Events” by resubmitting them back to the input queue

Note: Notice that ResubmitToQMgr, and ResubmitQueue are populated.

Filter messages
To filter retrieved messages on a specific value, for example display messages that has invoice number “12345”.

Sorting by header column
Sort messages once retrieved (Can sort on any column)

Display Message Details
Double click on message to view complete message body, including headers.
This is similar to IBM SupportPack IH03 (the famous rfhutil) utility.

Here you can format message depending on message type;
**Character – to view as character data.
**EBCDIC – to display EBCDIC data.
**XML – Parse, and format xml data.
**JSON – Parse, and format json data.
**COBOL – Parse, and format using a COBOL copybook.

Browse Button: view message using a default system browser.
COBOL message, formatting with Copybook;

Put Message Button

3.4.1 Open File
To load a MQ Message from a file.
















Write to Q Button
Use this button to write a message to a Queue.

Troubleshooting
1) Unauthorized error 2035
AMQERR01.LOG logs 2035 on SYSTEM.DEFAULT.MODEL.QUEUE.
Grant +dsp access to SYSTEM.DEFAULT.MODEL.QUEUE
setmqaut -m QMGR -t q -n SYSTEM.DEFAULT.MODEL.QUEUE -p user +dsp

Acknowledgements
The author would like to thank Mike (Shenfu) Fan. and Oliver Fisse from IBM Software Services ISSW team, for reviewing and helping to improve this article.

Downloads
zip binary: mqmsgman-v28

4 comments on"MQ Message Manager Utility"

  1. Ok, it throws 2046 error with no details.
    MQ version is 5.3
    Is it supported?

    • Sudhakar Bodapat July 26, 2019

      MQv5.3 Probably doesn’t work, it’s pretty old version.

  2. Does it work with Queue Managers named with underscore character? e.g. QM_test_1

    • Sudhakar Bodapat July 29, 2019

      Yes, it does support queue manager names with underscores.
      07/26/19 10:26:06: QM_TEST_1 Connected to Queue Manager…..
      Connected to Queue Manager….QM_TEST_1
      Retrieving messages from Queue…..SYSTEM.DEAD.LETTER.QUEUE

Join The Discussion

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