You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vss123 <vs...@gmail.com> on 2013/07/10 12:01:42 UTC
Log processor loses message
Hi,When we use log EIP with http, we observe a strange behaviour. The body of
the message is getting lost after it does logging.
public class LogTest extends CamelTestSupport { @Override protected
RouteBuilder createRouteBuilder() throws Exception { return new
RouteBuilder() { @Override public void configure()
throws Exception { from("direct:testEndpoint")
.to("http://google.co.in") .log("The response body:
${body}") .log("The response body again: ${body}");
} }; } @Test public void testLogEip() throws Exception {
template.sendBody("direct:testEndpoint", null); }}
When we run the test, we observe 'The response body again' does not have any
body logged.
Ideas?
Test file: LogTest.java
<http://camel.465427.n5.nabble.com/file/n5735417/LogTest.java>
--
View this message in context: http://camel.465427.n5.nabble.com/Log-processor-loses-message-tp5735417.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Log processor loses message
Posted by vss123 <vs...@gmail.com>.
Oops.. right..
Thank you :)
--
View this message in context: http://camel.465427.n5.nabble.com/Log-processor-loses-message-tp5735417p5735436.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Log processor loses message
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
See this FAQ
http://camel.apache.org/why-is-my-message-body-empty.html
On Wed, Jul 10, 2013 at 12:01 PM, vss123 <vs...@gmail.com> wrote:
> Hi,When we use log EIP with http, we observe a strange behaviour. The body of
> the message is getting lost after it does logging.
> public class LogTest extends CamelTestSupport { @Override protected
> RouteBuilder createRouteBuilder() throws Exception { return new
> RouteBuilder() { @Override public void configure()
> throws Exception { from("direct:testEndpoint")
> .to("http://google.co.in") .log("The response body:
> ${body}") .log("The response body again: ${body}");
> } }; } @Test public void testLogEip() throws Exception {
> template.sendBody("direct:testEndpoint", null); }}
> When we run the test, we observe 'The response body again' does not have any
> body logged.
> Ideas?
> Test file: LogTest.java
> <http://camel.465427.n5.nabble.com/file/n5735417/LogTest.java>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Log-processor-loses-message-tp5735417.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen