activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xabhi <xabh...@gmail.com>
Subject How to get number of unacknowledged messages on the broker?
Date Wed, 10 Jun 2015 10:30:08 GMT
Hi,

I want to get the number of unacknowledged messages on the broker. Below is
the way I have implemented it currently. I am using BrokerPluginSupport
which extends MutableBrokerFilter which has the send() and acknowledge()
methods.

1. Keeping a counter which is increased in send() function -
TotalSentMessages
2. Keeping a counter which is increased in acknowledge() function -
TotalAckRecievedCount

TotalUnackedMessages = TotalSentMessages - TotalAckRecievedCount

I am getting this value close to 5.3 million which doesn't seem correct to
me in my setup.

I can't use BrokerView.getTotalMessageCount() as it reports only messages
held on queue, nothing about topic subcsribers.

Is there anything wrong in this method of calculating unacked messages? I
believe that I am missing some thing here but not sure what?

Thanks,
Abhi




--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-get-number-of-unacknowledged-messages-on-the-broker-tp4697616.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message