You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Serge Mick <ev...@idirect.com> on 2012/04/23 05:37:24 UTC

Scalability: Multiple containers with the same Camel Context

Hi,

In a learning mode here.

- Say, I have a Camel Context in a container, Tomcat in my case.
I want to have two+ instances of the container (Tomcat) to address my
performance/failover issues.

Q: How does Camel scale across multiple containers?

Details:
- Say, I have: FTP => JMS InOut => Print-The-Results Service
- I place the same route into two or more containers, expecting scalability
to trigger on.

Here is where my confusion comes from.
One instance (container with Camel context) may fire up a request to JMS
Provider, while a different instance may receive the response.
The 1st instance would hang up (or get an Exception into its Exchange); the
other instance would get the response with missing all the "enriched"
headers from the 1st instance Exchange.

I am clearly missing some points.
Your help is appreciated.
Thank you.
-
Serge







--
View this message in context: http://camel.465427.n5.nabble.com/Scalability-Multiple-containers-with-the-same-Camel-Context-tp5658343p5658343.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Scalability: Multiple containers with the same Camel Context

Posted by Serge Mick <ev...@idirect.com>.
Would it be correct to say that longer routes need to designed as a number
of atomic routes? 
By atomic I mean - to be executed within the very same Camel Context.
In other words, scalability across multiple containers is achieved by
properly designed routes.

Thank you, Claus.

--
View this message in context: http://camel.465427.n5.nabble.com/Scalability-Multiple-containers-with-the-same-Camel-Context-tp5658343p5660098.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Scalability: Multiple containers with the same Camel Context

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Apr 23, 2012 at 5:37 AM, Serge Mick <ev...@idirect.com> wrote:
> Hi,
>
> In a learning mode here.
>
> - Say, I have a Camel Context in a container, Tomcat in my case.
> I want to have two+ instances of the container (Tomcat) to address my
> performance/failover issues.
>
> Q: How does Camel scale across multiple containers?
>
> Details:
> - Say, I have: FTP => JMS InOut => Print-The-Results Service
> - I place the same route into two or more containers, expecting scalability
> to trigger on.
>
> Here is where my confusion comes from.
> One instance (container with Camel context) may fire up a request to JMS
> Provider, while a different instance may receive the response.
> The 1st instance would hang up (or get an Exception into its Exchange); the
> other instance would get the response with missing all the "enriched"
> headers from the 1st instance Exchange.
>
> I am clearly missing some points.
> Your help is appreciated.
> Thank you.
>
-
> Serge
>

If you do request/reply with JMS during the same message processing,
then you need to ensure the reply is sent back to the node that sent
the request.
This is done out of the box, unless you use replyToType=Exclusive.
Exclusive assumes the request/reply is using an exclusive queue on the
node.

But you most likely don't need to do request/reply over JMS as the
route originates from a FTP endpoint, which do not expect a reply
message (unlike lets say a web service, where a caller would expect a
reply).

So maybe you can scale up using just

route 1)
FTP -> JMS request queue

route 2)
JMS reply queue -> print result service



>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Scalability-Multiple-containers-with-the-same-Camel-Context-tp5658343p5658343.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/