You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by BenXS <bx...@yahoo.co.uk> on 2010/08/13 15:21:23 UTC

Can the same Java Bean consume from Queues or Topics? Only activemq.xml config change?

Assume I created successfully a Java Bean which consumes JMS msgs through an
onMessage() method from a queue.

Broker URL and queue name is defined in (Spring) XML in activemq.xml

Can I use the same (unchanged) java bean to consume jms msgs from a(nother)
topic instead from the previous queue?

As far as I can see I have simply to change the Sping XML declarations in
activemq.xml and to restart ActiveMQ. The Java Bean will listen then on a
topic.

Is this correct?

Otherwise: What must be changed in bean to switch from Queue to Topic
listening?

Ben

-- 
View this message in context: http://old.nabble.com/Can-the-same-Java-Bean-consume-from-Queues-or-Topics--Only-activemq.xml-config-change--tp29428625p29428625.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Can the same Java Bean consume from Queues or Topics? Only activemq.xml config change?

Posted by "Martin C." <ma...@gmx.at>.
Hi,

On Fri, Aug 13, 2010 at 3:21 PM, BenXS <bx...@yahoo.co.uk> wrote:

> Can I use the same (unchanged) java bean to consume jms msgs from a(nother)
> topic instead from the previous queue?

Yes, this should work.

You only have to be aware of the changed semantics and delivery guarantees.

Best regards,
Martin