0
votes

I have to call "third party" camel routes from my route (actually the third party routes were written by the guy at the next cubicle).

These camel routes go through CXF endpoints so they contain code like:

MessageContentsList messageContentsList = (MessageContentsList) exchange.getUnitOfWork().getOriginalInMessage().getBody();

and

String userId = (String) messageContentsList.get(2);

The third party route works when I start from that route. But if I start from my bigger route (which contains the third party route as a sub-route), the third party route is broken, and it's easy to see why (the exchange now looks different).

What are the best ways to be able to utilize the third party routes in my route?

Preferably without changing the third party code.

But if you are aware of a good way to do it by changing the third party code I would also be interested in seeing it as well.

Thanks.

1
It would be better if you give some more information like how did u pass the message through third party route in your route? - sathya_dev

1 Answers

0
votes

Maybe this one:

https://github.com/CamelCookbook/camel-cookbook-examples/issues/1

scranton commented on Jun 24, 2013

With nested direct: routes, useOriginalMessage(true) will use outer most original message versus original message in the innermost route that threw the exception. innermost original message is what is returned for seda: and other route types...