Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12626

Camel Tracing is not working for route with redelivery strategy

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      Description

      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:

          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");
          }
      

      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:

       

      [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
      

       

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              marvinstorage storage
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: