activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanumath <>
Subject What are the uses of Durable Subscribers
Date Mon, 16 Sep 2013 07:09:44 GMT
Hi All,

   we have 10 messages in Activemq and 2 consumers. consumers starting to
consume and processing messages If I trigger consumers corresponding links
at initial time.For this I wrote the following code

*ActiveMQConnectionFactory connectionFactory=new
Connection connection=connectionFactory.createConnection();
final Session session=connection.createSession(true,
Queue queue=session.createQueue("ThermalMap");
javax.jms.MessageConsumer consumer=session.createConsumer(queue);
//anonymous class
MessageListener listener = new MessageListener() {
		public void onMessage(Message msg) {
                 // My business code

I deployed this entire Application in *Apache Tomcat*.

Now, Consumers continuously consuming messages If any client sends message
to Activemq. so far it's fine.

Later If I want to stop consuming messages by consumers without stoping
*webserver(Apache Tomcat)*.

How can I achieve this.


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

View raw message