Smart Proxy: How to monitor smart proxy queues using JMX

Scenario

You suspect Smart Proxy events may be backing up or performing slowly. You would like to pinpoint if this is true and if so, where: on the subscriber or publisher.

  • PubA - smart proxy event publisher Nexus instance
  • SubA - smart proxy event subscriber Nexus instance

Prepare

Enable JMX on Nexus

See here for information on enabling JMX support in Nexus.

Gather Node IDs

In the case where the publisher has many subscribers, you need to find the node id of the subscriber you would like to inspect, so you know which queues to look at in JMX.

  1. On the subscriber, go to Administration/Capabilities
  2. Select the Smart Proxy: Identity capability
  3. Look for the Node ID value in the south panel:
    2013-05-10_1833_subscriber_node_id.png

Connect to Nexus Using VisualVM

Now connect to PubA and SubA via JMX using VisualVM. Connecting to a remote Nexus via JMX requires special configuration.

Monitor

Publisher Queue

On PubA JMX connection, open the MBeans tab and then expand the following node:

org.apache.activemq.<publisher-nodeId>.Queue.Consumer.<subscriber-nodeid>.VirtualTopic.nexus.event.public

In the right panel, double-click QueueSize to begin monitoring the queue with a graph.

2013-05-10_1900_publisher_queue.png

Subscriber Queue

On SubA JMX connection, open the MBeans tab and then expand the following node:

org.apache.activemq.<subscriber-nodeId>.Queue.[nexus.task]

In the right panel, double-click QueueSize to begin monitoring the queue with a graph.

2013-05-10_1857_subscriber_queue.png

Observe

The queue sizes should remain relatively small. This would indicate that consumption and publishing of events is not backing up and performing acceptably. If a queue grows large or empties slowly, this could indicate some problem that may need to be investigated further.

Have more questions? Submit a request

0 Comments

Article is closed for comments.