camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonin Stefanutti <>
Subject Re: Unexpected behaviour from threads async API in Camel 2.14.0
Date Thu, 08 Oct 2015 20:41:46 GMT
Hi Claudius,

Using the ProducerTemplate.sendBody [1] method to send a message to the direct endpoint actually
creates a UnitOfWorkProducer instance that blocks the caller thread until the unit of work
has completed [2]. So even if your route contains some asynchronous processing through the
threads DSL, the caller thread will block until the message is fully processed.

As your producing executor service thread pool size is equals to the task queue size of your
consuming executor, and given the call to sendBody is synchronous, no rejection occurs.




> On 07 Oct 2015, at 19:35, Claudius B <> wrote:
> Hi Camel community,
> I was trying to turn a route into asynchronous processing to cause it to
> return immediately using the threads API (
> When the route, more accurately the routes thread pool, cannot process more
> tasks, those should be rejected with an exception (Abort) - which is not
> happening.
> The unexpected behaviour is shown and further explained in this unit test:
> I would be very glad if someone could take a look on this and explain to me
> what is happening, if im using the API in the wrong way or if this might be
> a problem in Camel.
> Best regards
> Claudius

View raw message