camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shindito <>
Subject Avoiding duplicate messages
Date Tue, 21 Jan 2014 13:12:22 GMT
Hi guys,

consider the following route:


I have a Java program which does the following:
- create a Camel exchange, add an onComplition action to remove the exchange
from the cache on success, store the exchange in a cache, and then send it
to the srcEndpoint.
The camel route takes it from there and delivers the exchange to
destEndpoint1 and destEndpoint2.
If the JVM crashes between destEndpoint1 and destEndpoint2, then I make a
flush which:
- gets the Exchange from the cache and sends it to srcEndpoint.

My question is:
What is the Camel way to prevent destEndpoint1 from receiving the same
exchange twice (as it was already received before the JVM crash)? Please
note that there might be more then two destination endpoints in the route.
Is it possible to instruct the route not to deliver the message to endpoints
that have already received (acknowledged) it? Is this an exchange

If there is no Camel feature that would do this for me, what is your
recommendation: where should I plug-in my custom logic to perform what's
necessary to avoid duplicate messages?

Best regards,

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

View raw message