Not sure I follow you. Are you saying that camel routes are not graphs, or you want us to confirm that it is, or you see an implementation problem? More comments inline.
Hadrian On Jan 21, 2011, at 1:07 AM, unmarshall wrote: > > Hi Hadrian, > > Considering that a route is represented as a directed graph then consider a > complex scenario where the route consists of multiple splits and mappings > processors as part of the route. Splits might cause creation of sub-routes > where the control can branch to from the parent route. I can picture that. > Now consider that there is a split just before the final set of endpoints. > The delivery of messages to these endpoints is asynchronous. If an error > occurs in delivery to one of the branches and if the route is transacted > then there is a need to introduce IdempotentConsumer which would use an > IdempotentRepository. Maybe, maybe not. The IdempotentConsumer is the camel way of dealing with duplicates for destinations not equipped with that capability. > If the route receives thousands of messages per second then in that case > would the IdempotentConsumer approach not be costly? Maybe, but that's the nature of the beast. > Another way would be to trace the different active route where the message > flows in a stack and then only unwound the stack for the route where the > problem was and replay only that route in the graph. That removes the need > for an idempotent consumer. Camel doesn't currently keep a trace of how Exchanges flow on the route. This would be very costly too. It's something that was discussed in the past. Such a feature could be implemented (maybe piggybacking on the Tracer) and I see it more useful for tooling than production use, but it's just something we decided not to do. > Now if the route is not represented as a graph this traversal becomes a > problem. Camel routes are a directed (possibly cyclic) graph. > > Best Regards, > madhav > > > hadrian wrote: >> >> Yes, routes in camel are directed graphs, trees most of the time. Not sure >> what you saw that indicates otherwise. >> >> Cheers, >> Hadrian >> >> >> On Jan 20, 2011, at 3:36 PM, unmarshall wrote: >> >>> >>> Hi, >>> >>> Are routes in camel represented as graphs? When i see the class >>> DefaultCamelContext then i do not find any indication for the same. >>> >>> If this is right then what was the reason for not representing the routes >>> as >>> graphs? >>> >>> Best Regards, >>> Madhav >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Camel-routes-as-graphs-tp3350293p3350293.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-routes-as-graphs-tp3350293p3350876.html > Sent from the Camel - Users mailing list archive at Nabble.com.
