-
I have a JMX connection from a Java application using the "artemis-main" service to connect over 1099 in order to run a "getMessageCount()" against a queue. My main question is, do I have to connect to all 3 instances directly with JMX in order to get an accurate messageCount for a queue because of distribution? For context:
For context on the Java implementation
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
TL;DR you have to connect to all 3 instances directly with JMX in order to get an accurate messageCount for a queue because of distribution. Each broker instance has its own MBean instances that only reflect the state of the broker instance that hosts them. When a JMX client query the message count of a queue it gets only the count of the messages in the queue of the broker instance to which it is connected. |
Beta Was this translation helpful? Give feedback.
TL;DR you have to connect to all 3 instances directly with JMX in order to get an accurate messageCount for a queue because of distribution.
Each broker instance has its own MBean instances that only reflect the state of the broker instance that hosts them. When a JMX client query the message count of a queue it gets only the count of the messages in the queue of the broker instance to which it is connected.