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.
- On the subscriber, go to Administration/Capabilities
- Select the Smart Proxy: Identity capability
- Look for the Node ID value in the south panel:
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.
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.
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.