activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose MarĂ­a Zaragoza <>
Subject jmsTemplate + add listener to listener container
Date Wed, 03 Jul 2013 19:11:00 GMT

I'm newbie with Apache ActiveMQ and
I've started using 5.8.0 release + Spring

I want that every session created in a servlet container ( Tomcat ),
 subscribes itself as consumer/listener for message from a Topic ( created
into JMS broker by an admin )

I've got some questions:

If I've got a listener container as

<jms:listener-container concurrency="10" >
    <jms:listener id="QueueListener" destination="Queue.Name"
ref="queueListener" />


Can I add <jms:listener> ( a.k.a MessageListener ) to Listener Container on
runtime ?
I want to add one listener per  web session
How ?


 If I can't,

Can I create a Consumer on runtime and set a MessageListener for it by
using  jmsTemplate?
I tried to do it with JMS API in jmsTemplate.execute() with
And a Consumer is created but MessageListener never is called and message
is never consumed  from Topic.

Why ? How ?


If I can't ,

If I use PooledConnectionFactory + JMS API ( no listener-container )
do I need to close Connection objects and release Consumers/Producers by
hand ?

Remember I want to create a Consumer per session


Is there other way to do all these things on an easy mode ?

Thanks and regards

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message