ActiveMQ Topic Test

In ActiveMQ server, a topic implements publish and subscribe semantics. When you publish a message, it goes to all the subscribers who are interested - so zero to many subscribers will receive a copy of the message. Only subscribers who have an active subscription at the time the broker receives the message will get a copy of the message.

This test monitors the topics and collect some of the key metrics like count of producers, consumers, size etc. The trends of these metrics provide valuable insights to the administrators about the current and potential problems. Using these insights administrators can handle the problem before it causes performance dissipation.

Target of the test : An Active MQ Server

Agent deploying the test : An internal/remote agent.

Outputs of the test : One set of results for each topic in ActiveMQ Server being monitored

Configurable parameters for the test



Test period

How often should the test be executed.


The host for which the test is to be configured.


The port at which the specified host listens. Default value is 8161.


Specify the duration (in seconds) for which this test should wait for a response from the target ActiveMQ Server. If there is no response from the target beyond the configured duration, the test will timeout. By default, this is set to 240 seconds.

JMX Remote Port

Specify the port at which the JMX listens for requests from remote hosts. Ensure that you specify the same port that you configured in the file in the <JAVA_HOME>\jre\lib\management folder used by the ActiveMQ Server.


Specify the lookup name for connecting to the JMX connector of the ActiveMQ Server. By default, this is jmxmi.

JMX User, JMX Password and Confirm Password

These parameters appear only if the Measurement Mode is set to jmx. If JMX requires authentication only (but no security), then ensure that the JMX User and JMX Password parameters are configured with the credentials of a user with read-write access to JMX.

JMX Registry SSL

If you have registered the JMX connector in an SSL-enabled RMI registry , set this flag to Yes. By default, this is set to No.

Measurements made by the test



Measurement Unit


Producer count

Indicates the number of producers that create and publish messages to this topic.


If there is a very large number of producers publishing to topic, it is just matter of time before system will start experiencing performance issues. If the number of producers is increasing, the administrators may need to augment capacity or add more queues.

Consumer count

Indicates the number of consumers that receive message from this topic.


Ideally the number should be optimal, and this doesn't directly correspond to the number of producers. Important thing is, there should be adequate consumers to consume majority of messages so that messages can be deleted and space can be freed up.

Queue size

Indicates the number of messages that are currently available on this topic.


If the current size of queue is increasing over the measurements, it could be because of some problem at consumer side or queue expiration policy.

Dequeue count

Indicates the total number of messages deleted from this topic since the last restart.


Ideally the value of this measure is expected to be greater than or equal to the value of Enqueue count measure.

Enqueue count

Indicates the number of messages sent this topic since the last restart.


Together with dequeue count, a high number indicates healthy use of queue.

Dispatch count

Indicates the total number of messages sent to consumer sessions from this topic,


Number of messages delivered should be near to the number of messages produced.

Expired count

Indicates the number of messages that were not delivered because they expired.


As per the queue expiration policy, messages expire after some time if not delivered to right consumer. a large count indicates that there are not enough consumers.

Inflight count

Indicates the number of messages that were sent from this topic to consumer sessions but have not been acknowledged.


If the value of this measure is high, it could affect topic performance.


Indicates the total number of subscriptions to this topic.


There is no hard limit to number of subscription to the queue but the number should be optimal for best performance.


Indicates whether or not this topic is a DLQ.


A dead-letter queue (DLQ) is a special type of message queue that temporarily stores messages that a software system cannot process due to errors.

The numeric values that correspond to these measure values are as follows:

Measure Value Numeric Value
True 0
False 1


By default, this measure reports the Measure Values listed in the table above to indicate whether the topic is DLQ or not. In the graph of this measure however, the same is indicated using the numeric equivalents only.

Average message size

Indicates the average size of messages published to this topic.


Although there is no limitation on the size of messages, high average size could explain slow delivery of messages.

Maximum page size

Indicates the maximum number of messages that can be paged in from this topic.


Increase this value to improve performance for destination's that contain grouped messages that are consumed by multiple concurrent consumers.

Maximum enqueue time

Indicates the maximum amount of time for which the messages remained enqueued.


A high enqueue time for few messages could be due to large message size, average enqueue time is a better indicator of queue performance assuming the sizes are properly distributed.



Minimum enqueue time

Indicates the maximum amount of time for which the messages remained enqueued.


Average enqueue time

Indicates the average amount of time the messages remained enqueued on the topic.


Memory limit

Indicates the amount of memory limit used for holding undelivered messages before paging them in to temporary queue from this topic.



Memory percentage usage

Indicates the percentage of memory used by this topic.



Memory usage byte count

Indicates the amount of memory used by this topic.