Louis Burton created CAMEL-15027:
------------------------------------

             Summary: KafkaEndpoint Sourced Headers are Overwritten By Default 
Propagation
                 Key: CAMEL-15027
                 URL: https://issues.apache.org/jira/browse/CAMEL-15027
             Project: Camel
          Issue Type: Bug
          Components: camel-kafka
    Affects Versions: 3.2.0
            Reporter: Louis Burton


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to