Camel Multicast sync vs async

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Camel Multicast sync vs async

contactreji
Hello Community

I have a camel multicast as follows

from("jetty:http://0.0.0.0:8081/sort?httpMethodRestrict=PUT")
        .convertBodyTo(String.class)
        .multicast(new
ListAggregator()).parallelProcessing().to("direct:A","seda:B","direct:C").end()
        .log("API response ${body}")
        .end();


I want one of those 3 branches to be async and don't want multicast to
kinda aggregate the result which comes from seda:B route. Is there a
way I can achieve that functionality? In above example, I want the
aggregator to hit completion criteria once direct:A and direct:C is
done its processing.

Cheers

Reji Mathews
Reji Mathews Sr. Engineer - Middleware Integrations / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB ) LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a Twitter - reji_mathews
Reply | Threaded
Open this post in threaded view
|

RE: Camel Multicast sync vs async

dimas
Hi Reji,

Not sure, but  it looks like you want to wiretap the seda:B route while multicasting to the other two.

Cheers,
Dmitry



-----Original Message-----
From: Reji Mathews [mailto:[hidden email]]
Sent: Thursday, July 9, 2020 1:24 PM
To: [hidden email]
Subject: Camel Multicast sync vs async

Hello Community

I have a camel multicast as follows

from("jetty:https://urldefense.com/v3/__http://0.0.0.0:8081/sort?httpMethodRestrict=PUT__;!!LdWlNaMnLCM!NUvcuGYoOSX9AodBe4MkLfZPuLSR1Qs_ERdbnjXkyoyuOudlHqJ4YWT1NyWFCEAMQ3XY$ ")
        .convertBodyTo(String.class)
        .multicast(new
ListAggregator()).parallelProcessing().to("direct:A","seda:B","direct:C").end()
        .log("API response ${body}")
        .end();


I want one of those 3 branches to be async and don't want multicast to kinda aggregate the result which comes from seda:B route. Is there a way I can achieve that functionality? In above example, I want the aggregator to hit completion criteria once direct:A and direct:C is done its processing.

Cheers

Reji Mathews