Got this response in IPF group which worked for me.
Subscribers.each { subscriber ->
def node = from(subscriber.fromEndpoint)
.processRef(subscriber.processor.bean)
for (int i = 1; i <= subscriber.postProcess.steps; ++i) {
node = node.processRef(subscriber.postprocess${i}.processor)
.to(subscriber.postprocess${i}.url)
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-create-a-dynamic-route-based-on-some-properties-tp5505605p5512463.html
Sent from the Camel - Users mailing list archive at Nabble.com.