-
1. Re: Callback based on multiple wireTaps?
davsclaus Oct 5, 2012 1:52 AM (in response to jasonnh)So the route "direct:destination3" should wait until the 2 previous routes has completed?
You could possible store a AtomicInteger as a header, which will then get copied when tapped. And then when an exchange complete it can count down the integer.
When it reaches zero they are complete and you can continue.
There may be more elegant ways, but my morning coffee isn't working at full strength yet.
-
2. Re: Callback based on multiple wireTaps?
davsclaus Oct 5, 2012 1:55 AM (in response to jasonnh)You could also use a java bean to send the messages using a ProducerTemplate
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ProducerTemplate.html
It has some async methods with on completion callbacks (and a Future returned). Then you can use that to known when the message is complete. And therefore only send the messages to the 3rd destination when the previous 2 is done.