camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Is there a way to route to an HTTP Endpoint without blocking?
Date Wed, 09 Dec 2009 15:03:55 GMT
On Wed, Dec 9, 2009 at 3:42 PM, jweathers777 <> wrote:
> I have a simple route that reads incoming mesages from a JMS queue, sends
> them to a webservice that hands back a response message that I then process
> and record:
> from("activemq:queueA").to("http://mywebservice").process(new
> DoSomething()).to("file://logs)
> Currently, if the web service times out, this route blocks and doesn't
> process other messages intended for the web service until the timeout period
> ends at which point the held back messages get processed.
> Is there a way to configure this route or a different kind of route to
> accomplish the goal of allowing messages to continue moving through to the
> web service even while one message is stilling being processed by the web
> service?
> I tried setting the MaxConnectionsPerHost to 5 as described under "Setting
> MaxConnectionsPerHost" here:
> However, I still saw the blocking behavior after making these configuration
> changes.
> --

You can use concurrentConsumers=10 on the JMS endpoint which will give
you 10 threads at once for routing form the JMS queue.
This is probably the easiest.

In Camel 2.1 there is a new feature - toAsync

Which we will expand in the future but it does allow to use non
blocking request/reply.

> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message