2010/1/11 yaog <[email protected]>:
>
> Basically, I am evaluating Camel at the moment.
>
> It is desired by our architecture to have routes that activate different
> beans (through different queues) and be able to get their responses back to
> the caller thread.
So to activate your two beans when a message is sent to queue "compA"
or "compB" you'd write 2 routes like this...
<route>
<from uri="jms:compA" />
<to uri="bean:compAImpl" />
</route>
<route>
<from uri="jms:compB" />
<to uri="bean:compBImpl" />
</route>
Each route represents a 'consumer' on a queue. In this case you are
creating 2 consumers on queues compA and compB which when a message is
sent to them, you invoke beans and return the response.
The single route with a single pipeline you started this thread with
has a different effect...
<route id="route1">
<from uri="direct:start" />
<to uri="bean:compAImpl" />
<to uri="jms:compB" />
<to uri="bean:compBImpl" />
<to uri="jms:compC" />
<to uri="bean:compCImpl" />
</route>
this will just send a message to compB queue (i.e be a producer on
that queue, not a consumer) and wait for the response from that queue,
then send it on to the bean compBImpl. i.e. for the pipeline to work,
there must be a consumer on the queue compB. This is why Claus
suggested a separate route to act as the consumer on queue compB.
> So that is what I am trying to do. If I define different routes I will not
> be able to send the info back...
I don't follow this last sentence.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/