The only workaround I can think of right now is to use the AMon framework and
develop a Monlet that listens for these events (addConnection, addProducer,
removeProducer, etc.) and then sends some sort of informational message that
it produces. The contents of the message are based on the info that is
provided by the corresponding AMon BaseEvent object. For example, the
addConsumer BaseEvent object provides references to both the
ConnectionContext and ConsumerInfo objects. From these objects, you can
gather all sorts of info re the just-added consumer and current state of the
broker. A Monlet is a 'Camel Route' so you can have the Monlet use any of
Camel's components (e.g., JMS) to send the message to whatever endpoint or
destination you'd like.  

Hope this helps. 

Joe 


Boarder wrote:
> 
> Thank you for the answer, Joe. The advisory messages seem to be what I
> want. However, I would also need this to work with Stomp. As I saw here:
> http://old.nabble.com/Consuming-Advisory-messages-from-ActiveMQ-using-stomp-td21977199.html
> it seems impossible for me to really understand what the event was about
> when it was a Stomp event.
> 
> Is there any other workaround or won't I just be able to know when a
> consumer or producer disconnects or subscribes to a Stomp queue or topic?
> 
> Thanks,
> Tiago
> 
> 
> 
> Joe Fernandez wrote:
>> 
>> You may want to look at using advisory messages 
>> 
>> http://activemq.apache.org/advisory-message.html
>> 
>> Or for more finer-grained control check out this free AMQ monitoring
>> framework.
>> 
>> http://www.ttmsolutions.com/Transactional_Software_Solutions/Active_Monitor_AMon.php
>> 
>> Joe
>> 
>> 
>> Boarder wrote:
>>> 
>>> I can't seem to find a way to listen for new producer and consumer
>>> connections (or connection interrupts) in ActiveMQ (Java Version). I
>>> want to be able to tell the consumers (or they can find out themselves)
>>> that the producer's connection dropped. The other way around (the
>>> producer finding out that a certain consumer disconnected) is also
>>> required.
>>> 
>>> I'd appreciate if someone could help me.
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/ActiveMQ-Consumer---Producer-Connection-Listener-tp26272011p26286574.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to