Monitor ActiveMQ queue: How to find age of a message sitting on a queue
Hi,
We are trying to implement a custom AMQ monitoring setup using which we would like to monitor specific queues. We want to capture information like-
1. number of messages Enqueued
2.number of messages Dequeued
3. how long a messages has been sitting on a Queue
We are able to implement use case 1 and 2 but struggling to find out a way to solution case 3. We have had instances when an application seems to be connected to AMQ broker but unable to read the messages from the queue and thus messages start piling up. This can be addresses by setting a threshold on the Enqueue count but what in case the consumer is acting real slow but still picking the messages up.
Please suggest if there is a way to capture the age of a message on the queue.
Thanks