Hi,
The documentation at http://activemq.apache.org/advisory-message.html
http://activemq.apache.org/advisory-message.html says:
"advisory messages also have a consumerCount header to indicate the number
of active consumers on the destintation when the advisory message was sent"
However looking at the AdvisoryBroker src (where consumers is a map of all
consumers):
advisoryMessage.setIntProperty("consumerCount", consumers.size());
suggests that it is the total number of consumers on the broker that is sent
in this header. I was planning on using this advisory topic to determine
when there are no consumers on a specific destination and therefore stop
sending to it.
Will the other advisory topic
(AdvisorySupport.getNoQueueConsumersAdvisoryTopic()) that fires when sending
to a queue with no consumers will not tell me when some consumers have
reconnected.
My use case is to stop sending to a destination when there are no consumers
for that destination and to restart sending when there are >0 consumers. It
does not matter if the signals are async.
What would be the correct way to achieve this use case?
Thanks,
Joe
--
View this message in context:
http://www.nabble.com/AdvisoryBroker-consumerCount-incorrect-tp14759255s2354p14759255.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.