I am using camel routes.
<camel:from uri="direct:startRoute"/>
<camel:to uri="bean:firstBean?method=method1"/>
<camel:to uri="bean:SecondBean?method=method2"/>
<camel:to uri="bean:thirdBean?method=method3"/>
method1() needs 5-6 different objects for processing so I have formed a Map
& put required objects in this map. I am passing map using
ProducerTemplate.sendBody("direct:startRoute",map).
I am getting all objects in method1() properly, no issue.
But method2() has signature with input parameter as String, here it is
giving me conversion error saying "no converter available to convert map to
String".
For solving this problem, I put the input param of method2() in map &
passing this map onward.
*Here unnecessarily I have to pass Map to all routes.*
*Is it required that if I am passing an object of one type in sendBody() at
the start of route then I have to continue with same object for rest of
routes. *
I tried for custom converter, but that have to register with camelcontext &
get applied for all routes.
How to solve this problem? Please help me.
Can we have route specific converters? if yes then please tell me how can I
use it.
--
View this message in context:
http://camel.465427.n5.nabble.com/is-it-require-to-keep-datatype-of-inputParams-same-for-all-routes-tp5648290p5648290.html
Sent from the Camel - Users mailing list archive at Nabble.com.