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

KafkaEndpoint Sourced Headers are Overwritten By Default Propagation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: camel-kafka
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      https://issues.apache.org/jira/browse/CAMEL-11935
      https://github.com/apache/camel/blob/camel-3.2.0/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java#L172-L176

      The KafkaEndpoint now populates Camel Message header values based on the Kafka record attributes. These are values specific to the Kafka record read from the poll.

      https://issues.apache.org/jira/browse/CAMEL-12503
      The KafkaConsumer and KafkaProducer support propagation of Camel Headers to Kafka.

      When combining these two behaviours, this means that we set the 'kafka.' headers originally from the record, we produce these headers onto any subsequent Kafka messages. If camel-kafka then reads this message, it will overwrite the correct KafkaEndpoint set values for record specific information such as Topic name and timestamp, overwriting with the header values it had propagated from a prior Kafka record.

      Ultimately, camel-kafka sets incorrect message headers if reading a Kafka record produced by camel-kafka from a Kafka input previously.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                louisburton Louis Burton
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: