2
votes

I'm developing an application which requires me to keep track of when a message expires on an ActiveMQ topic and when a message expires because a client/consumer/subscriber failed to acknowledge the message in time.

I know that to find out when a message expires on a topic I can just listen to the ActiveMQ advisory ActiveMQ.Advisory.Expired.Topic. However, I also need to keep track of which consumers/clients are expiring the most amount of messages, which means I need their consumer/clientId etc whenever a message expires. Is there an advisory or methodology that I can use in order to accomplish this?

I'm new to ActiveMQ so my knowledge of how JMS messaging works is limited. My understanding is that a producer sets a message expiry time and if the consumer does not consume the message within a certain time period then the message is expired and sent to expiration queue. I need to find to find out which consumers are failing to receive messages.

I appreciate any guidance. Thank you.

1

1 Answers

0
votes

There is no way to do this consumer to expired message correlation because a message can expire at the broker without ever being dispatched to a consumer and so there's no data recorded at the consumer level.