camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: seda concurrency when sending messages to another route
Date Tue, 22 Jul 2014 05:32:59 GMT
Hi

No the direct component does not use the MEP. It just continues
routing the message. And when its done, it returns back to the route
that called it.

eg from A -> to B -> to direct C -> to D

from direct C -> to E -> to F

then when its done at F, then it continues in the 1st route, and goes
to D. And then its done at D, there is no more routes, and the
consumer at A can send back a reply to whoever called it (if its
InOut) or just terminate if its InOnly mode.



On Mon, Jul 21, 2014 at 4:03 PM, Robert Rich <rrich@gsti.net> wrote:
> Thanks Claus!
>
> Is this because it is (as described in the docs) a 'synchronous call to another endpoint'?
  Does the exchange pattern used in the seda route influence this at all?  If it's InOut,
does the Out come from the referenced direct route?
>
> Sorry for all the questions!
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Monday, July 21, 2014 2:18 AM
> To: users@camel.apache.org
> Subject: Re: seda concurrency when sending messages to another route
>
> Hi
>
> Yes you can break up big routes into multiple routes, and "link" them together using
direct endpoints.
> And yes the seda consumer will not pickup a new message while you call other routes using
direct.
>
> On Sun, Jul 20, 2014 at 6:12 PM, Robert Rich <rrich@gsti.net> wrote:
>> Hi folks,
>>
>> My understanding is that the seda queue is single-threaded by default, primarily
by virtue of 'concurrentConsumers' defaulting to '1'.   To me this means that the route will
not pull another message off of the queue until the last one has completed processing.  This
is my desired behavior.
>>
>> However, the route is getting quite long, and I'm wondering if it's possible to pass
the message to another route while ensuring that the seda consumer will not pull another message
off of the queue until that 'invoked' route has completed.  I'm assuming this would be done
via 'direct', possibly with a specific exchange pattern applied to one or both routes?
>>
>> In the case I have in mind, the second/invoked route would end the processing chain,
but is it possible to have such a pattern in the middle of a route as well, such that the
message is passed to a route and the output of that route inserted back into the processing
chain of the first route, almost like a subroutine?  It seems like the enricher pattern could
be (ab)used this way, but it doesn't seem like that is the intent.
>>
>> Thanks!
>>
>> Bob
>>
>>
>> --
>> Robert Rich
>> CTO/VP
>> Global Security Technologies, Inc.
>> Direct: (614) 291-3456
>> Fax: (614) 356-8078
>> www.gsti.net
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message