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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        17d 22h 20m 1 Christian Müller 21/Oct/11 22:51
        In Progress In Progress Resolved Resolved
        1d 12h 35m 1 Christian Müller 23/Oct/11 11:27
        Resolved Resolved Closed Closed
        1m 40s 1 Christian Müller 23/Oct/11 11:28
        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