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

doCatch of a rollback only executes one line after doCatch and prune the rest of the route

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.16.0
    • 3.18.0
    • came-core
    • None
    • Unknown

    Description

      I have following route (simplified)

              from("quartz://MY_CTRL?cron=0+0/10+8-12+?+*+MON-FRI").routeId("MY_CTRL").
                      transacted("PROPAGATION_NEVER").
      .
      .
      .
                      doTry().
                      to("direct:MY_CSV").
                      doCatch(Throwable.class).
                      log("CSV generation or upload failed. So delete azure blob").
                      log("blahblahblah").
                      end(); // end try
      
              from("direct:MY_CSV").routeId("MY_CSV").
                      transacted().
      .
      .
      .
                      filter(body().isNotEqualTo(Boolean.TRUE)).
                      rollback()
                      stop().
                      end().
      .
      .
      .
      

      that doesn't print blahblahblah. When I replace rolback() with throwException(new RuntimeException("Failed to upload")) it does.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            yasserzamani Yasser Zamani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: