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

camel-core - Problem with transacted routes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.14.1
    • 3.14.2, 3.16.0
    • came-core
    • None
    • Unknown

    Description

      I'm working on an update of the camel library version used to the latest LTS release (3.14.1), but it seems to have broken my tests that are using transacted.

      I have a simple test route which reads in a file, parses the content using bindy and sending the validated parts to a jms queue.

      from("inputFile:///temp/testing/input2/")
          .autoStartup(true)
          .transacted()
          .unmarshal(format)
          .split(body())
              .to("bean-validator:x")
              .to("direct:sendMessage2")
          .end()
      .end();
      
      from("direct:sendMessage2")
          .convertBodyTo(String.class)
          .to("jms://be.test.output")
      .end(); 

      If one of the parts of the file doesn't pass the validation rules, the test expects to find no messages on the queue.

      This used to work in camel-3.7.x, but now in camel 3.14.1 messages do appear on the queue, even when parts of the file failed the validation.

      In the migration guide of 3.12 -> 3.13 is an entry about transactions, but it is not clear to me if this is related.

      Upon further investigation the split() seems to cause the issue with the transactionality, if i put 2 posts to jms inline in the route and throw an exception before the second post the result is no messages on the queue.

      Do i have to add something to the split to allow the transaction to propagate?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              TCke83 Tom Cassimon
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: