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"
class="com.arbitron.pmi.messaging.outbound.BrokerConnectionAdvisory">
</bean>
Defined a container using the DefaultMessageListenerContainer and the
listener is set as the listener bean defined above
<bean id="brokerConnAdvisoryContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="jmsFactory" />
<property name="destination" ref="brokerConnAdvisoryT" />
<property name="messageListener" ref="brokerConnAdvisoryListener" />
</bean>
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
server..:-)
--
View this message in context:
http://activemq.2283324.n4.nabble.com/Advisory-Messages-tp3552270p3596506.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.