You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by abhijith <to...@gmail.com> on 2017/06/07 01:56:13 UTC

Artemis Address Message Count

Hi,

We are monitoring Artemis via JMX.  We have a topic(address with multicast)
which has a divert to a queue.  If I send messages to this address messages
gets diverted correctly to queue.  But if I query address mbean both
messageCount and noOfMessages is 0.  

Is this expected?  I think address should have messageCount regardless of
queue or a divert associated with it.  Currently I cannot get no of messages
sent to an address.  The only way I can get it is to pull binding names and
loop through them.





--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Address-Message-Count-tp4727127.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Artemis Address Message Count

Posted by abhijith <to...@gmail.com>.
Thanks for the information Justin. I am counting numbers on all the diverts
now and will continue with that.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Address-Message-Count-tp4727127p4727162.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Artemis Address Message Count

Posted by Justin Bertram <jb...@apache.org>.
> But IMHO it is misleading behavior..right?

I don't think it's misleading.


> As publisher I would like to get count of no of messages sent to an address.

We don't currently track the total number of messages sent to an address.  The message count is just the number of message currently residing in the queues bound to the address.


> Publisher won't worry about how many queues or diverts are associated to an address.

I suppose that depends on the publisher.


> Right now if queues are not associated with an address, there is no way to directly get a message count.

I don't believe there actually is a way for a queue to not be associated with an address.  In other words, a queue is always associated with an address.  When you configure a divert you configure the "forwarding-address" where the messages are sent which in turn will send those messages to the queues associated with that address according to the configured semantics (i.e. anycast or multicast).  You can check the message count of this address if you like.  You can also check the message count for any queue as well.

----- Original Message -----
From: "abhijith" <to...@gmail.com>
To: users@activemq.apache.org
Sent: Wednesday, June 7, 2017 9:04:01 AM
Subject: Re: Artemis Address Message Count

Thanks Justin.  But IMHO it is misleading behavior..right?  As publisher I
would like to get count of no of messages sent to an address.  Publisher
won't worry about how many queues or diverts are associated to an address. 

Right now if queues are not associated with an address, there is no way to
directly get a message count.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Address-Message-Count-tp4727127p4727159.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Artemis Address Message Count

Posted by abhijith <to...@gmail.com>.
Thanks Justin.  But IMHO it is misleading behavior..right?  As publisher I
would like to get count of no of messages sent to an address.  Publisher
won't worry about how many queues or diverts are associated to an address. 

Right now if queues are not associated with an address, there is no way to
directly get a message count.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Address-Message-Count-tp4727127p4727159.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Artemis Address Message Count

Posted by Justin Bertram <jb...@apache.org>.
When you get the message count for an address it sums the message count for all the queues bound directly to that address.  In the case of a multicast address that would be, for example JMS subscriptions, explicitly configured queues (from broker.xml), etc.  This does not include queues receiving messages sent to the address via a divert.  Therefore, if you don't have any queues specifically bound to the address then I would expect a 0 message count.


Justin

----- Original Message -----
From: "abhijith" <to...@gmail.com>
To: users@activemq.apache.org
Sent: Tuesday, June 6, 2017 8:56:13 PM
Subject: Artemis Address Message Count

Hi,

We are monitoring Artemis via JMX.  We have a topic(address with multicast)
which has a divert to a queue.  If I send messages to this address messages
gets diverted correctly to queue.  But if I query address mbean both
messageCount and noOfMessages is 0.  

Is this expected?  I think address should have messageCount regardless of
queue or a divert associated with it.  Currently I cannot get no of messages
sent to an address.  The only way I can get it is to pull binding names and
loop through them.





--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Address-Message-Count-tp4727127.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.