문제

I have a route defined as such using a route definition in java:

routeDefinition = from("someLocation");
routeDefinition.setExchangePattern(ExchangePattern.InOut);
routeDefinition.to("log:camel.logging?level=INFO&showOut=true");
routeDefinition.to("someOtherLocation");
routeDefinition.routeId("someId");

The message is consumed and responded to as expected, but when I look at the log the "Out" message is always null i.e.

camel - Exchange[ExchangePattern:InOut, BodyType:String, Body:{"timestamp":1393602518590,"headers":{"JMSCorrelationID":"54783292"},"data":{...}}, Out: null]

How can I log both the incoming and outgoing message?

도움이 되었습니까?

해결책

Forget about the OUT as the FAQ says.

If you add the log at the end of the route, then what the log output in IN i what is returned to the client.

Its the pipes and filters principle http://camel.apache.org/pipes-and-filters.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top