Camel
  1. Camel
  2. CAMEL-4510

Camel flatpack component drops all headers from the original message

    Details

    • Estimated Complexity:
      Unknown

      Description

      In the simple example:

      from("file:/foo.csv")
         .setHeader("MyHeader", constant("Hello"))
         .to("flatpack:foo");
      
      from("flatpack:foo")
         .to("bean:importer");
      

      Header "MyHeader" is not being passed to the bean in the second route.

      Looking at Camel Flatpack code I see that in FixedLengthEndpoint.processDataSet it creates an exchange object from scratch and, thus, looses any incoming headers.

        Activity

        Daniel Kulp committed 1201772 (1 file)
        Reviews: none

        Recorded merge of revisions 1186053,1187222,1187582 via svnmerge from
        https://svn.apache.org/repos/asf/camel/trunk

        ........
          r1186053 | davsclaus | 2011-10-19 05:42:02 -0400 (Wed, 19 Oct 2011) | 1 line
          
          Fixed CS
        ........
          r1187222 | ningjiang | 2011-10-21 05:01:39 -0400 (Fri, 21 Oct 2011) | 1 line
          
          CAMEL-4570 DefaultCxfBinding should take consideration of the Exchange.HTTP_RESPONSE_CODE
        ........
          r1187582 | cmueller | 2011-10-21 18:33:36 -0400 (Fri, 21 Oct 2011) | 1 line
          
          CAMEL-4510: Camel flatpack component drops all headers from the original message
        ........

        J. Daniel Kulp <dkulp@apache.org> committed f52b2197c9a03d6c834e51ce4878e1dc3c23948e (0 files)
        Reviews: none

        Recorded merge of revisions 1186053,1187222,1187582 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk
        ........
          r1186053 | davsclaus | 2011-10-19 05:42:02 -0400 (Wed, 19 Oct 2011) | 1 line
          
          Fixed CS
        ........
          r1187222 | ningjiang | 2011-10-21 05:01:39 -0400 (Fri, 21 Oct 2011) | 1 line
          
          CAMEL-4570 DefaultCxfBinding should take consideration of the Exchange.HTTP_RESPONSE_CODE
        ........
          r1187582 | cmueller | 2011-10-21 18:33:36 -0400 (Fri, 21 Oct 2011) | 1 line
          
          CAMEL-4510: Camel flatpack component drops all headers from the original message
        ........


        git-svn-id: https://svn.apache.org/repos/asf/camel/branches/camel-2.8.x@1201772 13f79535-47bb-0310-9956-ffa450edef68

        Christian Müller made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Christian Müller added a comment -

        Hello Dragisa!
        It would be great if you could test whether this patch fix your issue.
        Best,
        Christian

        Show
        Christian Müller added a comment - Hello Dragisa! It would be great if you could test whether this patch fix your issue. Best, Christian
        Christian Müller made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Christian Müller added a comment -

        Committed to branch 2.7.x with revision r1187859

        Show
        Christian Müller added a comment - Committed to branch 2.7.x with revision r1187859
        Hide
        Christian Müller added a comment -

        Committed to branch 2.8.x with revision r1187857

        Show
        Christian Müller added a comment - Committed to branch 2.8.x with revision r1187857
        Christian Müller made changes -
        Fix Version/s 2.7.5 [ 12318648 ]
        Fix Version/s 2.8.3 [ 12318649 ]
        Fix Version/s 2.9.0 [ 12316374 ]
        Hide
        Christian Müller added a comment -

        Committed to trunk with revision r1187582

        Show
        Christian Müller added a comment - Committed to trunk with revision r1187582
        Christian Müller made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Dragisa Krsmanovic added a comment -

        If I get some time, I'll try to submit a patch. Currently I have a workaround for this.

        Show
        Dragisa Krsmanovic added a comment - If I get some time, I'll try to submit a patch. Currently I have a workaround for this.
        Hide
        Christian Müller added a comment -

        Hello Dragisa!
        Thanks for reporting. Do you consider to provide a patch for it?
        Best,
        Christian

        Show
        Christian Müller added a comment - Hello Dragisa! Thanks for reporting. Do you consider to provide a patch for it? Best, Christian
        Christian Müller made changes -
        Assignee Christian Müller [ muellerc ]
        Dragisa Krsmanovic made changes -
        Description In the simple example:

        {code}
        from("file:/foo.csv")
           .setHeader("MyHeader", constant("Hello"))
           .to("flatpack:foo);

        from("flatpack:foo")
           .to("bean:importer");
        {code}

        Header "MyHeader" is not being passed to the bean in the second route.

        Looking at Camel Flatpack code I see that in {{FixedLengthEndpoint.processDataSet}} it creates an exchange object from scratch and, thus, looses any incoming headers.
        In the simple example:

        {code}
        from("file:/foo.csv")
           .setHeader("MyHeader", constant("Hello"))
           .to("flatpack:foo");

        from("flatpack:foo")
           .to("bean:importer");
        {code}

        Header "MyHeader" is not being passed to the bean in the second route.

        Looking at Camel Flatpack code I see that in {{FixedLengthEndpoint.processDataSet}} it creates an exchange object from scratch and, thus, looses any incoming headers.
        Dragisa Krsmanovic made changes -
        Field Original Value New Value
        Component/s camel-flatpack [ 12313959 ]
        Component/s camel-ejb [ 12315336 ]
        Dragisa Krsmanovic created issue -

          People

          • Assignee:
            Christian Müller
            Reporter:
            Dragisa Krsmanovic
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development