This content has been marked as final.
Show 2 replies
-
1. Re: How to maintain state through a camel route in SMX 3.4
davsclaus Oct 15, 2009 10:08 AM (in response to tbpotter)You can store state on the Camel Exchange as property. They will there for the entire lifecycle for that particular exchange while its being routed in Camel.
The RouteBuilder is used to create the route model to the actual runtime route and as such there is only one instance of it.
You can access the properties on the Exchange from a Camel processor
public void process(Exchange exchange) throws Exception { String foo = (String) exchange.getProperty("myFoo"); ... exchange.setProperty("myFoo", updatedValue); }
-
2. Re: How to maintain state through a camel route in SMX 3.4
tbpotter Oct 15, 2009 2:49 PM (in response to davsclaus)Thanks for your quick reply!!! I'll implement it the way you suggested.