Ok thanks to both Timothy & Bill for the responses:


Bill Schuller wrote:
> 
> The QueueBrowser JMS API call is intended for browsing the content of
> messages in a queue. If you are just looking for counts of the pending
> messages in a queue/topic, I think you¹re on the wrong trail. No
> experience
> with Python or ActiveMQ-CPP, so I¹m not sure what your options are, but I
> think this link should get you headed in the right direction:
> 
> http://activemq.apache.org/how-can-i-monitor-activemq.html
> 

Ok, from what i read on the link above using advisory messages appear to be
my best bet.. however I dont see that functionality in the pyactivemq
documentation.  I could be wrong, but i have spent quite some time
researching this. 

Basically this is the scenario:

1.) There is a Game Server which uses ActiveMQ (Server sends messages to
specified queue's/topic's)
2.) There are Game Clients (Among other kinds of clients).
3.) There is a message consumer  (basically it takes the messages off the
queue and stores the necessary information in a table (db).

The Server and some of the "clients" are java based, where as others are
python based. What i need to accomplish is a way to monitor: 
    * How Many Consumers are Connected (If none, maybe pause messages,
probably store them in  cache or something until someone is available to
receive them)
    * The size of a actual queue or topic (Its quite easy to crash ActiveMQ
with a GB or more worth of messages).

What i am trying to accomplish is to find a way to do this in one of the
python clients, its somewhat of a system monitor: Monitors if AMQ is
running, consumer... stuff like that ... as well as the definite "AMQ
Resources themselves"... now after reading up on Advisory Messages if i had
a way to directly access:
  If a topic/queue is full - The link that you showed above does give some
definite suggestions (in java) for how i would do something like this. One
question that i have is, is it possible to subscribe to an advisory topic (I
personally have tried to no avail).

Given i'd like to be able to check for this advisory message if possible:
advisoryWhenFull.. "ActiveMQ.Advisory.FULL"

As well as  Accessing Consumer/Producer count via the advisory messages:
  ActiveMQ.Advisory.Producer.Queue 
  ActiveMQ.Advisory.Producer.Topic 
  ActiveMQ.Advisory.Consumer.Queue 
  ActiveMQ.Advisory.Consumer.Topic

See reference link below:
http://activemq.apache.org/advisory-message.html Advisory Message 

-----
“A foolish man tells a woman to stop talking, but a wise man tells her that
her mouth is extremely beautiful when her lips are closed”
-- 
View this message in context: 
http://www.nabble.com/PyActiveMQ%3A-Retrieving-Queue-Size-%28Or-other-Queue-related-info%29-tp21460541p21501488.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to