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

Camel Tracing is not working for route with redelivery strategy

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment