How does Cross process transaction tracing in MQ Powerpack, with and without achieving a handshake, work?

Document ID:  TEC1052276
Last Modified Date:  06/07/2017
{{active ? 'Hide' : 'Show'}} Technical Document Details

Products

  • CA Application Performance Management

Releases

  • CA Application Performance Management:Release:10.3

Components

  • APM AGENTS:APMAGT
Introduction:

When running cross process transaction tracing with MQ powerpack agent, we can do it with or without achieving a handshake.  How does either case work?  Why is a handshake recommended? 

Instructions:

Cross Process Tracing configuration –

•          MQ CPT can be achieved in 2 ways – With handshake or without handshake.

 

•          With handshake(recommended) – 

o       Create the handshake Queue on a Queue Manager

§  define QLOCAL(CA_WILY_HANDSHAKE) USAGE(NORMAL) PUT(ENABLED) GET(ENABLED) DEFPSIST(NO) SHARE DEFSOPT (SHARED) DESCR('For Introscope Use')

o       Create SYSTEM.ADMIN.ACTIVITY.QUEUE in all the QMs that are being monitored by MQMonitor, if not present

 

§  define QLOCAL(SYSTEM.ADMIN.ACTIVITY.QUEUE) USAGE (normal) DESCR('For Introscope Use')

o       Configure SYSTEM.ADMIN.ACTIVITY.QUEUE in all the QMs

§  alter QLOCAL (SYSTEM.ADMIN.ACTIVITY.QUEUE) PUT (enabled) GET (enabled) DEFPSIST (no) SHARE DEFSOPT (SHARED) MAXDEPTH (999999999)

o       In all the Queue Manager properties, set the activity reporting property to “Queue”. Then restart the QM. This will make the QM to generate traces in SYSTEM.ADMIN.ACTIVITY.QUEUE. These traces will be consumed by the MQMonitor later.

 

§  alter QMGR ACTIVREC(QUEUE)

o       Set the CPT related property to true in MQAgent.properties

§  mq.crossprocesstracing.enabled = true

o       Set all the Handshake related properties in MQAgent.properties file and in MQMonitor.properties file. The handshake properties should match in both the files.

§  In MQMonitor.properties –

                                                                 handshake.mqagent.id = 123

     handshake.qm.host = <hostname X>

     handshake.qm.port = 1414

     handshake.qm.channelname = WILY.MON.CH01

     handshake.queue= CA_WILY_HANDSHAKE

              mq.monitor.agent.id = 101

§  In MQAgent_1.properties –

     mqmonitor.mqagent.id.list = 123

     handshake.mqagent.id = 1

     handshake.qm.host = <hostname X>

     handshake.qm.port = 1414

 

     handshake.qm.channelname = WILY.MON.CH01

 

     handshake.queue=CA_WILY_HANDSHAKE

§  In MQAgent_2.properties –

            mqmonitor.mqagent.id.list = 123

            handshake.mqagent.id = 2

            handshake.qm.host = <hostname X>

            handshake.qm.port = 1414

            handshake.qm.channelname = WILY.MON.CH01

 

            handshake.queue=CA_WILY_HANDSHAKE

§  In MQAgent_3.properties –

            mqmonitor.mqagent.id.list = 123

            handshake.mqagent.id = 3

            handshake.qm.host = <hostname X>

            handshake.qm.port = 1414

            handshake.qm.channelname = WILY.MON.CH01

 

            handshake.queue=CA_WILY_HANDSHAKE

§  In MQAgent_4.properties –

            mqmonitor.mqagent.id.list = 123

            handshake.mqagent.id = 4

            handshake.qm.host = <hostname X>

            handshake.qm.port = 1414

            handshake.qm.channelname = WILY.MON.CH01

                                 handshake.queue=CA_WILY_HANDSHAKE

§  In MQAgent_5.properties –

            mqmonitor.mqagent.id.list = 123

            handshake.mqagent.id = 5

            handshake.qm.host = <hostname X>

            handshake.qm.port = 1414

            handshake.qm.channelname = WILY.MON.CH01

 

            handshake.queue=CA_WILY_HANDSHAKE

  • Without handshake –

o       Configure SYSTEM.ADMIN.ACTIVITY.QUEUE in all the QMs

§  alter QLOCAL (SYSTEM.ADMIN.ACTIVITY.QUEUE) PUT (enabled) GET (enabled) DEFPSIST (no) SHARE DEFSOPT (SHARED) MAXDEPTH (999999999)

o       In all the Queue Manager properties, set the activity reporting property to “Queue”. Then restart the QM. This will make the QM to generate traces in SYSTEM.ADMIN.ACTIVITY.QUEUE.

o       Set the CPT property to true in MQAgent.properties file and restart the agent.

§  mq.crossprocesstracing.enabled = true

 

o       Leave all the handshake related properties as blank in MQMonitor.properties and MQAgent.properties files.

 

 

How Handshake works –

The MQMonitor and the MQ java agent tries to communicate with each other using a common queue(CA_WILY_HANDSHAKE). After achieving the handshake, the MQ java agent will come to know the information related to all queue managers that are active and are being monitored by the MQMonitor. Then it will make sure that the traces are generated in only those QMs.

For example, if MQMonitor is monitoring 5 different QMs, then through handshake, the MQ java agent will come to know about those 5 QMs. The MQ java agent will then set the activity bit in the MQ message, only if that message is reaching to any of those 5 QMs. If the activity bit is set in the MQ message, then the trace information will be generated in the queue SYSTEM.ADMIN.ACTIVITY.QUEUE when that message reaches the destination queue.

 

Use of Handshake –

Now, the use of handshake is that it can check all the QMs that are running and being monitored by MQMonitor instances. It is basically a handshake between MQMonitors and MQ java Agent(MQNameFormatter).

 

Consider a scenario where the customer’s application is sending messages to a queue manager QM1. And these messages are then sent to QM3 through QM2 in between. Let us consider that the customer wants to monitor(through MQMonitor) only QM1 and QM3, leaving behind QM2. In this case, if the CPT is turned on without handshaking, then activity messages will be generated in all the 3 QMs – QM1, QM2 & QM3. These messages are supposed to be consumed by MQMonitor. But as the MQMonitor is monitoring only QM1 & QM3, it will consume only those activity messages in QM1 and QM3. Now, the QM2’s messages will be left unconsumed which later results into overflowing in the queue and affects the performance as well. If the CPT is turned on using handshake properties, it will ensure that the activity messages are generated in only those QMs which are monitored by MQMonitor.

Please help us improve!

Will this information enable you to resolve your issue?

Please tell us what we can do better.

{{feedbackText.length ? feedbackText.length : '0'}}/255

{{status}}

Not what you were looking for?

Search Again >

Product Information

Support by Product >

Communities

Join a Community >

Chat with CA

Just give us some brief information and we'll connect you to the right CA ExpertCA sales representative.

Our hours of availability are 8AM - 5PM CST.

All Fields Required

connecting

We're matching your request.

Unfortunately, we can't connect you to an agent. If you are not automatically redirected please click here.

  • {{message.agentProfile.name}} will be helping you today.

    View Profile


  • Transfered to {{message.agentProfile.name}}

    {{message.agentProfile.name}} joined the conversation

    {{message.agentProfile.name}} left the conversation

  • Your chat with {{$storage.chatSession.messages[$index - 1].agentProfile.name}} has ended.
    Thank you for your interest in CA.


    Rate Your Chat Experience.

    {{chat.statusMsg}}

agent is typing