marvin created CAMEL-12626:
------------------------------
Summary: Camel Tracing is not working for route with redelivery
strategy
Key: CAMEL-12626
URL: https://issues.apache.org/jira/browse/CAMEL-12626
Project: Camel
Issue Type: Bug
Affects Versions: 2.20.2
Reporter: marvin
Camel Tracing is not being executed if there is redelivery strategy defined.
In our context we have switched on the camel Tracer with the following:
{code:java}
public static void main(String[] args) throws Exception {
DefaultCamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
// If errorHandler with redelivery is removed then tracer
output is visible again.
errorHandler(new
DefaultErrorHandlerBuilder().maximumRedeliveries(3).redeliveryDelay(2000L));
from("direct:start").process(new Processor() {
public void process(Exchange exchange) throws Exception {
System.out.println("PROCESSED");
}
});
}
});
// Enable Tracer.
context.setTracing(true);
context.start();
ProducerTemplate template = context.createProducerTemplate();
template.sendBody("direct:start", "foo");
}
{code}
We noticed that we were missing output from the tracer that we were excepting.
If you remove the errohandler with redelivery you can see the output we
expected:
{code:java}
[main] INFO org.apache.camel.processor.interceptor.Tracer - ID-rmm-xxx-xxx-x-x
>>> (route1) from(direct://start) --> Processor@0x130d63be <<< Pattern:InOnly,
Headers:{breadcrumbId=ID-rmm-xxx-xxx-x-x}, BodyType:String, Body:foo
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)