Camel
  1. Camel
  2. CAMEL-1233

Pipeline could change the MEP unintended

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.6.0, 2.0-M1
    • Component/s: camel-core
    • Labels:
      None

      Description

      When exchanges is processed from pipeline they result is copyed as input to the next exchange. However during this copy Camel could potentially change the MEP to InOut. It should respect the original MEP.

      The flaw is in ExchangeHelper#copyResults

      Fixing this also forces end users to use the correct send/request method on ProducerTemplate. Now Camel will keep the MEP.
      So if you are using send then its inOnly and then you the there is no result. Use request for InOut MEP's.

      This breaks a few of our own unit testing that was using the wrong method.

        Activity

        Hide
        Claus Ibsen added a comment -

        I guess we should get it into 1.x as well?

        Show
        Claus Ibsen added a comment - I guess we should get it into 1.x as well?
        Hide
        Claus Ibsen added a comment -

        The patch with the fix plus a few unit tests than should send the correct MEP when starting the route

        Show
        Claus Ibsen added a comment - The patch with the fix plus a few unit tests than should send the correct MEP when starting the route
        Hide
        Claus Ibsen added a comment -

        Fixed in trunk

        Sending camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
        Sending camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
        Adding camel-core/src/test/java/org/apache/camel/processor/PipelineMEPTest.java
        Sending camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
        Sending camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
        Adding camel-core/src/test/java/org/apache/camel/processor/onexception/InterceptAlterMessageBeforeRedeliveryTest.java
        Transmitting file data ......
        Committed revision 732378.

        Show
        Claus Ibsen added a comment - Fixed in trunk Sending camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java Sending camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java Adding camel-core/src/test/java/org/apache/camel/processor/PipelineMEPTest.java Sending camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java Sending camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java Adding camel-core/src/test/java/org/apache/camel/processor/onexception/InterceptAlterMessageBeforeRedeliveryTest.java Transmitting file data ...... Committed revision 732378.
        Hide
        Claus Ibsen added a comment -

        1.x branch: Committed revision 732393.

        Show
        Claus Ibsen added a comment - 1.x branch: Committed revision 732393.
        Hide
        Claus Ibsen added a comment -

        Closing 2.0m1 tickets

        Show
        Claus Ibsen added a comment - Closing 2.0m1 tickets

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development