Hello Bhushan,

As Willem say you need to use a topic if you want all messages to go
to both endpoints. Or, if you for some legacy reason can not change
the destination to a topic, you could create one camel route that
simply gets the messages and then use a recipient list[1] to route to
two routes where you do the actual work.

If instead you are after competing subscribers (two threads reading
from messages from the same queue) you should use concurrent consumers
see the JMS component documentation [2].

[1] http://camel.apache.org/recipient-list.html
[2] http://camel.apache.org/jms.html

// Pontus

On Tue, Jul 31, 2012 at 11:28 AM, Willem jiang <willem.ji...@gmail.com> wrote:
>
> Hi,
>
> You need to use the topic if you want to send the message to the two endpoint 
> at the same time.
>
> --
> Willem Jiang
>
>
>
> On Tuesday, July 31, 2012 at 2:57 PM, bhushand wrote:
>
>> Hi
>> One more thing, can I use same queue for two endpoints. Right now I am
>> trying to do same thing but it is giving me error-
>>
>> "org.apache.camel.FailedToStartRouteException:
>> Failed to start route because of Multiple consumers for the same endpoint
>> is not allowed"
>>
>> I am trying something like this
>> <route>
>> <from uri="jms:queue:Myqueue"/>
>> <to uri="endpoint1"/>
>> </route>
>>
>> <route>
>> <from uri="jms:queue:Myqueue"/>
>> <to uri="endpoint2"/>
>> </route>
>>
>> Is there any other way to achieve this. Can I use queue only for this.
>>
>>
>> Thanks
>> --Bhushan
>>
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/soap-over-jms-tp5715942p5716624.html
>> Sent from the Camel - Users mailing list archive at Nabble.com 
>> (http://Nabble.com).
>>
>>
>
>

Reply via email to