Re: Async bean method

2017-05-11 Thread mortalisk
I found that the queue can not be transacted=true to have async processing. When I turned this off, messages are consumed asynchronously. Thanks for you help :) - Morten Bendiksen -- View this message in context: http://camel.465427.n5.nabble.com/Async-bean-method-tp5799201p5799303.html Sen

Re: Async bean method

2017-05-11 Thread mortalisk
I added the "?asyncConsumer=true", and saw no difference. Still only one message is picked at a time per queue. "concurrentConsumers" would add more actual threads listening to the queue, right? I would prefer to simply pick messages with one thread, and hand of work to be processed asynchronously

Re: Async bean method

2017-05-10 Thread Zoran Regvart
Hi Morten, are you using the JMS component? Take a look at `concurrentConsumers` and `asyncConsumer` properties[1], zoran [1] https://camel.apache.org/jms.html#JMS-ConcurrentConsuming On Wed, May 10, 2017 at 4:20 PM, mortalisk wrote: > Guess I am mistaken about whenComplete blocking the thread.

Re: Async bean method

2017-05-10 Thread mortalisk
Guess I am mistaken about whenComplete blocking the thread. I thought that was the difference of *Async and not in the CompletableFuture, so never mind that. However I still see this behaviour where only one message is processed at a time, even though all the code is running in a separate thread

Re: Async bean method

2017-05-10 Thread mortalisk
My route: In the executor bean (only message type was changed to : It definitely seems to only run the "process" method one by one. I added a sleep in "preProcess" (which is inside the "thenApplyAsync" so it should not block the camel thread, which would make it wait for that much longer until

Re: Async bean method

2017-05-10 Thread Zoran Regvart
Hi Morten, are you sure about this? Could it be that your own code is blocking the consumer. I just run a simple example with the file consumer and an bean processor returning CompletionStage. >From what I observe is that the consumer thread keeps polling the filesystem even if I sleep in the thre