Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.2.0
-
None
-
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
- links to