The Exchange properties won't be visible as the sub-routes would have different exchange objects. I have verified this by checking the exchange IDs and they were different in each sub-routes.. The exchange properties set in one sub route when accessed on other sub-routes returned null. am I missing anything?
As suggested by Claus, I created a common bean to store the data required, which I am accessing in each of the routes. On Tue, Mar 1, 2022 at 12:57 AM Jeremy Ross <jeremy.g.r...@gmail.com> wrote: > You could also set a map instance in a header or exchange property and any > of the changes to map entries would be visible across sub routes and > siblings. > > On Fri, Feb 25, 2022 at 8:04 PM Rohan Emmanuel <rohan.emmanue...@gmail.com > > > wrote: > > > Thank you Claus so much for your quick reply.Much appreciated. > > > > On Fri, 25 Feb 2022, 7:57 pm Claus Ibsen, <claus.ib...@gmail.com> wrote: > > > > > Hi > > > > > > That is not possible as the design when using multicast is that the > > > exchange are independent. > > > If you need to share some data then use an external shared bean you > > > can access from the multicased sub routes. > > > > > > > > > On Fri, Feb 25, 2022 at 1:26 PM Rohan Emmanuel > > > <rohan.emmanue...@gmail.com> wrote: > > > > > > > > Hi , > > > > I am using multicast in my route like mentioned below. > > > > i am setting a property in one of these routes with id route2, which > i > > > want > > > > to access in the multicast route1. i see that the exchange property > is > > > null > > > > in the route1. > > > > can you please let me know how can i achieve this? > > > > > > > > > > > > > > > > <route id="route1"> > > > > <multicast stopOnException="true"shareUnitOfWork="true> > > > > > > > > <to uri="direct:organisation_endpoin.dest1"/> > > > > > > > > <to uri="direct:organisation_endpoint.dest2"/> > > > > > > > > </multicast> > > > > <log message="main route ${exchangeProperty.testprop} ." /> > > > > </route> > > > > > > > > > > > > <route if="route2"> > > > > <from uri="direct:organisation_endpoint.dest1"/> > > > > <setProperty name="testprop"> > > > > <simple>hello</simple> > > > > </setProperty> > > > > </route> > > > > > > > > > > > > <route id="route3"> > > > > <from uri="direct:organisation_endpoint.dest2"/> > > > > </route> > > > > > > > > -- > > > > Regards, > > > > Rohan Emmanuel > > > > > > > > > > > > -- > > > Claus Ibsen > > > ----------------- > > > http://davsclaus.com @davsclaus > > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > > > -- Regards, Rohan Emmanuel