On Sun, Aug 14, 2011 at 5:21 AM, xiangqiuzhao <xiangqiuz...@gmail.com> wrote: > my route like > from("direct://test").process("convertOut").to("mycompomnent").process("convertIn") > > i need to send local message to mycompomnent, but i need to convert message > to the format before send and mycompomnent is sync mode, so i need to > convert the response message to my format after get response. > > i must use two processor to handle? > > how to use route like > from("direct://test").process("converter").to("mycompomnent") > > in the process converter, i how to know what the request from direct and > response from mycompomnent?
You need to put the converters before and after the mycomponent. from("direct://test").process("beforeConverter").to("mycompomnent").process("afterConverter") You may also consider enhancing mycomponent to be able to do the before conversion itself. Also Camel provides a built in type converter system http://camel.apache.org/type-converter.html > > -- > View this message in context: > http://camel.465427.n5.nabble.com/how-to-process-sync-exchange-mode-tp4697451p4697451.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/