The on completion is called when the exchange is done routing.

So if .to(jms) is InOnly then the exchange is done after it has sent
the message to the queue as fire and forget.
But if .to(jms) is InOut then the exchange is done after it has
received the correlated reply message over JMS.



On Tue, Dec 10, 2013 at 9:01 AM, shindito <atanas.shin...@gmail.com> wrote:
> Hi guys,
>
> I want to store exchanges in a cache before processing them with Camel
> routes. Consider the following route:
>
> from(vm)
> .to(file)
> .to(jms);
>
> My emitter application performs the following operations:
> 1. store exchange in cache
> 2. Add oncompletion callback
> 3. send exchange to vm (the Camel route takes it from here)
>
> However, I want to have this exchange purged from the cache only if it has
> been processed by ALL route endpoints - file and jms. My questions are:
> - When gets an http://camel.apache.org/oncompletion.html callback invoked?
> When the final (jms) endpoint is reached, or on every endpoint reached by
> the exchange (file, jms)? When is an exchange completed? Is this
> configurable - to have the callback invoked only when the exchange has been
> sent to all route endpoints?
> - Will the https://camel.apache.org/message-history.html of the exchange
> contain information about all endpoints that have been processed, or only
> about the last one? If only the last endpoint is known, how can I get the
> whole route history?
>
> Thanks for the assistance.
>
> Best regards,
> Atanas
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Oncompletion-callbacks-and-message-history-of-Camel-exchanges-tp5744543.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to