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

Intercept doesn't work when onException's maximumRedeliveries is set

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Resolved
    • Affects Version/s: 2.21.2
    • Fix Version/s: None
    • Component/s: came-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When both intercept() and onException() are applied to the route and maximumRedeliveries() is set, then interceptor is not called. If maximumRedelvieries() is removed, interceptor works. Here is an example:

      public class MyRouteBuilder extends RouteBuilder {
          public void configure() {
              intercept()
                      .setBody().constant("Intercepted-message");
      
              onException()
                      .maximumRedeliveries(2) // comment this line to make intercept() work
                      .log("${body}");
      
              from("timer:mytimer?repeatCount=1&delay=1000")
                      .setBody().constant("Hello Test")
                      .log("${body}");
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Bogatyrov Vladimir Bogatyrov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: