You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ppou <pa...@gmail.com> on 2012/05/24 09:42:20 UTC
seda & concurrent consumers
I have a requirement to route exchanges sequentially to a POJO processors.
I am trying something like the following:
.from("direct:start")
.to("xslt:xslt/transform.xsl")
.to("seda:In");
from("seda:In?concurrentConsumers=1").to("bean:rsProcessor");
The bean processor is sending the body payload to an external service using
a socket, and it should wait to read a response before sending the new
request.
I thought I could ensure this operation with concurrentConsumers=1 in the
seda component. Is this not the case?
How can I achieve such an operation?
Regards,
Panos
--
View this message in context: http://camel.465427.n5.nabble.com/seda-concurrent-consumers-tp5713463.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: seda & concurrent consumers
Posted by Christian Müller <ch...@gmail.com>.
Yes, this fulfill your requirements.
Best,
Christian
Sent from a mobile device
Am 24.05.2012 11:20 schrieb "ppou" <pa...@gmail.com>:
> the bean opens a socket to connect to an external service and waits for a
> response, however in the current implementation when another Exchange
> reaches the bean it also sends the body to the service using the same
> connector. This creates conflicts.
>
> I was wishing to limit the number of exchanges that go to to the bean, and
> I
> thought it could be done with seda and concurrentConsumers
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/seda-concurrent-consumers-tp5713463p5713468.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: seda & concurrent consumers
Posted by ppou <pa...@gmail.com>.
the bean opens a socket to connect to an external service and waits for a
response, however in the current implementation when another Exchange
reaches the bean it also sends the body to the service using the same
connector. This creates conflicts.
I was wishing to limit the number of exchanges that go to to the bean, and I
thought it could be done with seda and concurrentConsumers
--
View this message in context: http://camel.465427.n5.nabble.com/seda-concurrent-consumers-tp5713463p5713468.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: seda & concurrent consumers
Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, May 24, 2012 at 9:42 AM, ppou <pa...@gmail.com> wrote:
> I have a requirement to route exchanges sequentially to a POJO processors.
>
> I am trying something like the following:
>
> .from("direct:start")
> .to("xslt:xslt/transform.xsl")
> .to("seda:In");
>
> from("seda:In?concurrentConsumers=1").to("bean:rsProcessor");
>
>
> The bean processor is sending the body payload to an external service using
> a socket, and it should wait to read a response before sending the new
> request.
>
> I thought I could ensure this operation with concurrentConsumers=1 in the
> seda component. Is this not the case?
>
> How can I achieve such an operation?
>
Then let the bean wait for the reply.
What do you do in the bean code?
You would need to have the bean block/wait for the reply.
> Regards,
>
> Panos
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/seda-concurrent-consumers-tp5713463.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/