You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by npujol <ni...@yahoo.com> on 2015/01/31 20:00:37 UTC

Return Future from route via ProducerTemplate.asyncCallbackSendBody

Hi,

 I have a route like this:

<route id="fragmentProcessingRoute">
            <from uri="direct:fragmentProcessingEndpoint" />
            <threads executorServiceRef="scanThreadPoolExecutor">
                <to uri="direct:scanFragmentEndpoint" />
            </threads>
</route>

I am invoking this route like this:

Future future =
_camelProducerTemplate.asyncCallbackSendBody("direct:fragmentProcessingEndpoint",
fragment)

I'd like to get access to the future (because I want potential cancel)  from
scanThreadPoolExecutor references by my <threads> tag.

How do I achieve that? Am I going about it the right way?  





--
View this message in context: http://camel.465427.n5.nabble.com/Return-Future-from-route-threads-via-ProducerTemplate-asyncCallbackSendBody-tp5762285.html
Sent from the Camel - Users mailing list archive at Nabble.com.