THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
ID-claus-acer/3690-1214458315718/2-0 -> node3 To[mock:a] InOnly Properties:{CamelCauseException=null} Headers:{to=James} Body:Hello London |
Wiki Markup |
---|
{{ID-claus-acer/3690-1214458315718/2-0}} is the breadcrumb with the unique correlation id. |
node3
is the id of the node in the route path. Is always shown.Toa
is the destination node.InOnly
is the exchange pattern. Is always shown.Then the rest is properties, headers and the
{{node3}} is the id of the node in the route path. Is always shown. {{To\[mock:a\]}} is the destination node. {{InOnly}} is the exchange pattern. Is always shown. Then the rest is properties, headers and the body. |
Enabling
To enable tracer from the main run
...
Code Block |
---|
2008-06-26 07:31:55,828 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-0 -> node5 Interceptor[Delegate(Pipeline[DeadLetterChannel[Delegate(TraceInterceptor[Processor[MyProcessor]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:a]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:b]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]]])] InOnly Properties:{} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,843 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-0 -> node2 Processor[MyProcessor] InOnly Properties:{CamelCauseException=null} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,843 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-0 -> node3 To[mock:a] InOnly Properties:{CamelCauseException=null} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,843 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-0 -> node4 To[mock:b] InOnly Properties:{CamelCauseException=null} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,859 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-1 -> node5 Interceptor[Delegate(Pipeline[DeadLetterChannel[Delegate(TraceInterceptor[Processor[MyProcessor]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:a]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:b]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]]])] InOnly Properties:{} Headers:{from=Claus} Body:This is Copenhagen calling
2008-06-26 07:31:55,859 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-1 -> node2 Processor[MyProcessor] InOnly Properties:{CamelCauseException=null} Headers:{from=Claus} Body:This is Copenhagen calling
2008-06-26 07:31:55,875 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-1 -> node3 To[mock:a] InOnly Properties:{CamelCauseException=null} Headers:{from=Claus} Body:This is Copenhagen calling
2008-06-26 07:31:55,875 [main ] INFO TraceInterceptor - ID-claus-acer/3690-1214458315718/2-1 -> node4 To[mock:b] InOnly Properties:{CamelCauseException=null} Headers:{from=Claus} Body:This is Copenhagen calling
|
Configuring from Java DSL
The tracer options can be configured from the Java DSL like this:
Code Block |
---|
public void configure() throws Exception {
// add tracer as an interceptor so it will log the exchange executions at runtime
// this can aid us to understand/see how the exchanges is routed etc.
Tracer tracer = new Tracer();
tracer.getFormatter().setShowBreadCrumb(false);
tracer.getFormatter().setShowNode(false);
...
getContext().addInterceptStrategy(tracer);
|
Enabling from Spring XML
There is now a trace attribute you can specify on the *<camelContext/> for example
...