camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oisin Hurley <>
Subject Re: id() in Java dsl
Date Tue, 07 Jul 2009 13:43:36 GMT
>>> from("file://C:/Debug/from").id("File_0").to("file://C:/test").id("File_1");

This is a pretty cumbersome usage and it kind of clutters up the Java
for the route - but having ids on the various bits of the pipeline is really
very useful if you are debugging, or if you are visualizing the overall
route graph.

It might be a better to decouple the id assignment from the Java route
specification - maybe there could be a concept of producing a strategy
for id allocation within a route, so basically Camel would automatically
allocate ids according to this strategy. It means no clutter in the Java
above as it would be done behind the scenes by the context.

Strategies/policies could be like - 'type of endpoint plus appended
monotonically increasing non-negative integer', or 'call this implementation
of EndpointIdentificationStrategy with the URI and type of endpoint'.


View raw message