camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apara <>
Subject Re: Unable to setup route with limit of 30 queue size and 5 processing threads
Date Thu, 30 Apr 2015 05:50:54 GMT
Ok, according to documentation on the bottom of this page:

I did the following:

public interface AsyncHandler {
    Future<EventData> asyncHandle(EventData data) throws HandlerException;

public interface SyncHandler {
    EventData handle(EventData data) throws HandlerException;

public interface Handler extends SyncHandler, AsyncHandler {

Then, I implemented asyncHandle in my base abstract class as:

    public Future<EventData> asyncHandle(final EventData data) throws
HandlerException {
            new FutureTask<>(
                new Callable<EventData>() {
                    public EventData call() throws Exception {

Finally, I changed all my proxy references to use AsyncHandler as the
interface and I changed all my invocations to use asyncHandle which returns

However, I must still be missing something as my processing does not advance
past the from, and still returns with: The OUT message was not received
within: 30000 millis.

I feel that somehow I need to tie this together with a ThreadPool and
execute my FutureTask<EventData>, but I thought that Camel would do that...

Do I need to create my own ThreadPool, throw the FutureTask<EventData> in
there and at the same time return it to the caller?

How do I get a reference to a thread pool created by Camel without tying my
code to Camel and making it aware of Camel?  Am I still missing something in
the configuration?  I changed all my routes to be vm:// instead of

Lord have mercy.


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

View raw message