activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aneesh <>
Subject Re: Advisory Messages
Date Tue, 14 Jun 2011 13:09:34 GMT
atlast i got it resolved..
This is how it works now..

Defined a topic <amq:topic id="brokerConnAdvisoryT"
physicalName="ActiveMQ.Advisory.Connection" />
in my embedded broker.

Defined a listener class (which is the java class which will have the logic
built in to identify whether 
a connection has been obtained/lost)
<bean id="brokerConnAdvisoryListener"

Defined a container using the DefaultMessageListenerContainer and the
listener is set as the listener bean defined above

<bean id="brokerConnAdvisoryContainer"
	    <property name="connectionFactory" ref="jmsFactory" />    
	    <property name="destination" ref="brokerConnAdvisoryT" />   
        <property name="messageListener" ref="brokerConnAdvisoryListener" />	      

Now the brokerConnAdvisoryListener will get triggered whenever an
AdvisoryMessage is sent to the topic "ActiveMQ.Advisory.Connection" and i
can use my logic to check whether the consumers connection has lost on the

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message