JMS messaging queues

One Star

JMS messaging queues

Can you please provide a tutorial for how to use tMOM in a talend job to listen for messages on a jms queue. Also, provide a short best practice for this type of setup(should I use a topic or a gueue). The biggest problem I am having is setting up a gueue for multiple listeners instead of round robin and is this a good approach or not.
Employee

Re: JMS messaging queues

Hi Peter
This sounds like the primary confusion concerns queues or topics. A queue by definition will deliver a message to exactly one consumer. There can be multiple competing consumers on the queue to effectively load balance the queue, but the message will only be delivered to exactly one of them. For example, if have queue Q with three consumers C1, C2, and C3, and I post messages m1, m2, m3, and m4 to Q, then m1 will be processed by exactly once of C1, C2, or C3, and the same is true of the other messages as well. There is no policy for deterministically controlling which consumer will get which message.
I am guessing from your description that for your "multiple" listeners case you would prefer to use a Topic. Topics, in contrast to queues, use a publish-subscribe metaphor so that every message is delivered to every current subscriber. If you want the ability for a subscriber to be temporarily disconnected, then you can use durable subscribers.
Note that from a load-balancing and fault tolerance perspective durable consumers are not ideal. See http://activemq.apache.org/nms/activemq-virtual-destinations.html for a discussion.
See the tMOM component in the Reference Guide for details regarding using the tMOM conmponent. Note that you will need to have an ActiveMQ broker instance running for the tMOM component to connect to.
Employee

Re: JMS messaging queues

I have posted an example of using tMOMconsumer in this related post http://www.talendforge.org/forum/viewtopic.php?pid=87218#p87218 .
One Star

Re: JMS messaging queues

I am using Topic is a non clustered environment. How can i configure tMOMInput as a durable subscriber. I shall really appreciate your help.

Re: JMS messaging queues

Hi,
I am using Topic with JMS mediation component. How can i configure tMOMInput as a durable subscriber.
Any Idea ?