Hi,

I am trying to acheive something like the following:

<wiretap uri="direct:destination1" />
<to uri="direct:destination2" />
<wiretap uri="direct:destination3" />

I have used wiretaps because nothing should stop the result of destination2
being return as quickly as possible (to replyTo).

However, I also need desintation 3 to:
- Only be started (asynchronously) when destination1 and destination2 are
both complete

As it stands destination1 does not have to complete before destination3
starts.

I guess I could use a multicast with a custom aggregator, e.g.:

<multicast strategyRef="destination2OnlyAggregationStrategy"
parallelProcessing="true">
        <to uri="direct:destination1" />
        <to uri="direct:destination2" />
</multicast>
<wiretap uri="destination3" />

But the trouble with that is the end result is dependent on destination1 and
destination2 completing not just destination2.

Using onCompletion does not seem to help as that does not allow for the
async WireTap.
It feels as if I need a callback based on the completion of both the
wiretapped destination1 and desintation2.

Any ideas how to achieve this?
Thanks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Callback-based-on-multiple-wireTaps-tp5720544.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to