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

OnComplete does not work on transactioned route after rollback

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.13.1
    • 2.12.5, 2.13.3, 2.14.0
    • camel-core
    • None
    • Moderate

    Description

      Example:

      Route Sample
      this.from("servlet:///test").routeId("CamelTestRoute") 
         .onCompletion() 
            .bean(this.logCompletionRoute) 
         .end() 
         .onException(Exception.class) 
            .log(LoggingLevel.ERROR, this.log, "Error on processing message. Sending Rollback command!") 
            .log(LoggingLevel.ERROR, this.log, "${exception.stacktrace}") 
            .rollback()
            .handled(true) 
         .end() 
         .transacted(RouteTransactionConfiguration.PROPAGATION_REQUIRED) 
         .process(new Processor() { 
                      @Override 
                      public void process(Exchange exchange) throws Exception { 
                          throw new Exception(); 
                      }}); 
      

      In this sample, the OnCompletion bean never is executed. But, if I remove the "rollback()" call, it is executed properly.

      thanks,

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            andrericos André Ricardo da Silva Souza
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: