Tracing the Advanced Message Queuing Protocol (AMQP) Service

The trace facility provided by the Advanced Message Queuing Protocol (AMQP) Service is provided to help IBM® Support to diagnose customer issues related to the service.


There are two ways to control trace for the IBM MQ AMQP service:

  • By using the strmqtrc and endmqtrc commands, to start and stop trace. Enabling trace, using the strmqtrc command, generates trace information for the entire queue manager where the IBM MQ AMQP service is running. This includes the IBM MQ AMQP service itself, and the underlying Java Message Queuing Interface (JMQI) that the service uses to communicate with other queue manager components.
  • By running the controlAMQPChannel command. Note, that turning trace on using the controlAMQPChannel command traces only the IBM MQ AMQP service.

If you are unsure which option to use, contact your IBM Support representative and they will be able to advise you on the best way to collect trace for the issue that you are seeing.


Procedure

  1. Method one
    1. Bring up a command prompt and navigate to the directory: MQ_INSTALLATION_PATH\bin
    2. Run the strmqtrc command to enable trace:
      strmqtrc -m qmgr_name
      where qmgr_name is the name of the queue manager where the IBM MQ AMQP service is running.
    3. Reproduce the issue.
    4. Stop trace, by running the command:
      endmqtrc -m qmgr_name
  2. Method two.
    1. Bring up a command prompt and navigate to the directory: MQ_INSTALLATION_PATH\bin
    2. Run the following command to enable trace:

      • controlAMQPChannel -qmgr=qmgr_name -mode=starttrace
      • ./controlAMQPChannel.sh -qmgr=qmgr_name -mode=starttrace
      where qmgr_name is the name of the queue manager where the AMQP Service is running.
    3. Reproduce the issue.
    4. When the issue occurs, stop trace by running the following command:

      • controlAMQPChannel -qmgr=qmgr_name -mode=stoptrace
      • ./controlAMQPChannel.sh -qmgr=qmgr_name -mode=stoptrace [clientid=ClientIdentifier]
      where qmgr_name is the name of the queue manager where the AMQP Service is running.


Results

To view the trace output, go to the following directory:

  • MQ_DATA_PATH\trace.
  • /var/mqm/trace.

The trace files containing the information from the AMQP Service are called amqp_N.trc, where N is a number.

Trace information generated by the JMQI is written to a trace file called amqp_PPPPP.trc, where PPPPP is the process identifier for the AMQP Service.