Camel
  1. Camel
  2. CAMEL-5069

OnException with handled and no further processing should not send the message to the error handler

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Not a Problem
    • Affects Version/s: None
    • Fix Version/s: 2.10.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      See nabble
      http://camel.465427.n5.nabble.com/Inconsistent-onException-behaviour-tp5541356p5541356.html

      Having

      
                      errorHandler(deadLetterChannel("mock:error"));
      
                      onException(Exception.class)
                          .handled(true);
      

      Should not route message to the DLC as the onException is handling the failure.

        Activity

        Claus Ibsen created issue -
        Hide
        Claus Ibsen added a comment -

        Works as intended, as having an onException with no output, solves special cases, where you want to handle the exception, but still let the message be handled by the DLC.

        Alternative we would have to break backwards compatible, and add validation to onException to fail if you use handled, and then do not have any outputs.

        Show
        Claus Ibsen added a comment - Works as intended, as having an onException with no output, solves special cases, where you want to handle the exception, but still let the message be handled by the DLC. Alternative we would have to break backwards compatible, and add validation to onException to fail if you use handled, and then do not have any outputs.
        Claus Ibsen made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.9.2 [ 12320143 ]
        Resolution Not A Problem [ 8 ]
        Hide
        Claus Ibsen added a comment -

        I added some notes for the Camel 3.0 roadmap to improve the onException.
        https://cwiki.apache.org/confluence/display/CAMEL/Camel+3.0+-+Roadmap

        Show
        Claus Ibsen added a comment - I added some notes for the Camel 3.0 roadmap to improve the onException. https://cwiki.apache.org/confluence/display/CAMEL/Camel+3.0+-+Roadmap

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development