Hi Christian, I solved this once by using an ExchangeNotifier that processes the Exchange Completed events. The callback is executed synchronously.
Mind you, there was a similar thread a few weeks ago, where more options were presented. But I'm still doubtful about some of them being synchronous (and I haven't had time to dig into the code to verify it). Regards, *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Apr 4, 2013 at 4:22 PM, Christian Müller < christian.muel...@gmail.com> wrote: > Camel version 2.8.0 > > We have a web servive route which use an idempotent repository (JDBC) to > prevent duplicates. If the processing of one exchange failed, the entry is > removed from the idempotent repository in the async onCompleation() > execution. > > From time to time we have the issue, that when the client send the request > again after only a few milli seconds, the entry wasn't removed from the > repository and processed as a duplicate. > > Is there a way to process the onCompleation() synchronously (before the web > service response is send back)? > > Thanks in advance, > Christian >