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

afterprocess of UnitOfWork doesn't work properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.7.0, 3.11.3
    • 3.13.0
    • came-core
    • None
    • Unknown

    Description

      steps to reproduce:

      Add custom UnitOfWork.

      overwrite the before process and after the process, the sequence of the process is before process-> after process -> process

      expected:

      before process -> process -> after process

      It was working fine in 3.4. The following code adds the after process to the last, so the process can follow the sequence.

      code:

                  if (beforeAndAfter) {                reactiveExecutor.schedule(() -> {                    // execute any after processor work (in current thread, not in the callback)                    uow.afterProcess(processor, exchange, callback, false);                });            }
      

      Link:

      https://github.com/apache/camel/blob/6a6a8cdc0d3b146995053ce86f270df4e0956a79/core/camel-base/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java#L293

      The code is removed from 3.11, so the process can't follow the sequence.

      https://github.com/apache/camel/blob/cbedd261336d576c558dcc2c4f4e358b27c9cb8f/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java#L407

       

       

       

       

       

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              zengbo Bo Zeng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: