0

This is my main-route,

.process(startOperation(DISTRIBUTION, GET_HOTEL_AGGREGATOR_RATES_API_MOM))
                .log("Calling CredentialRoute")
                .bean(AggrHelper.class, "getCredential")
                .log("Making parallel calls to vault")
                .multicast()
                .parallelProcessing()
                .to("direct:AgencyCredentialProcessing", direct:LocalCredentialProcessing")
                .end()
                 .bean(RatesPreProcessor.class, "preProcess")


        from("direct:AgencyCredentialProcessing").errorHandler(noErrorHandler())
                 -- setting value in exchange header, which came from main route
               .end();
  • Now i'm setting a value in the exchange header on sub-route(direct:AgencyCredentialProcessing), is not available once the control goes back to main-route. What configuration changes i need to that exchange changes in sub-route scope should be visible on main-route also.

Thanks in Advance, Raghavan

Raghavan
  • 401
  • 6
  • 21
  • 1
    You need to use an aggregation strategy on the multicast, where you can control what data to merge together as the result of the sub-routes and to use for continued routing in the main route. The multicast uses by default the latest response. – Claus Ibsen Mar 15 '19 at 04:58
  • Thanks Claus, It's resolved now.. – Raghavan Mar 15 '19 at 10:32

0 Answers0