You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/03/05 14:28:52 UTC

Apache Camel & Durable Topic Subscription

Hi,

In the camel jms documentation, it is mentioned that when we would
like to use Durable Topic Subscription, the limitation that we have is
that we can only consume message through one JMS connection (so one
thread) :

"If you wish to use durable topic subscriptions, you need to specify
both clientId and durableSubscriptionName. Note that the value of the
clientId must be unique and can only be used by a single JMS
connection instance in your entire network. You may prefer to use
Virtual Topics instead to avoid this limitation. More background on
durable messaging here."

That means that we cannot create a camel route where we use competitor
consumers (by increasing the number of threads by example) to
loadbalance the messages.

Is my assertion correct or my understanding of "a single JMS
connection instance in your entire network" is not correct ?

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Re: Apache Camel & Durable Topic Subscription

Posted by Tracy Snell <ts...@gmail.com>.
On Mar 5, 2010, at 8:28 AM, Charles Moulliard wrote:

> In the camel jms documentation, it is mentioned that when we would
> like to use Durable Topic Subscription, the limitation that we have is
> that we can only consume message through one JMS connection (so one
> thread) :
> 
> "If you wish to use durable topic subscriptions, you need to specify
> both clientId and durableSubscriptionName. Note that the value of the
> clientId must be unique and can only be used by a single JMS
> connection instance in your entire network. You may prefer to use
> Virtual Topics instead to avoid this limitation. More background on
> durable messaging here."
> 
> That means that we cannot create a camel route where we use competitor
> consumers (by increasing the number of threads by example) to
> loadbalance the messages.
> 
> Is my assertion correct or my understanding of "a single JMS
> connection instance in your entire network" is not correct ?

You are correct. Durable topics suck in general and you can almost always use a virtual destination instead. So you'd create a virtual queue from the topic, then you could use competitor consumers if you like.

http://activemq.apache.org/virtual-destinations.html

One thing to be careful about, once you create a virtual queue it'll persist even if there are no consumers until you delete it.

Tracy