You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Stefan Burkard (Jira)" <ji...@apache.org> on 2020/05/27 12:53:00 UTC
[jira] [Created] (CAMEL-15121) Interchanged use of
HeaderFilterStrategy methods in camel-kafka
Stefan Burkard created CAMEL-15121:
--------------------------------------
Summary: Interchanged use of HeaderFilterStrategy methods in camel-kafka
Key: CAMEL-15121
URL: https://issues.apache.org/jira/browse/CAMEL-15121
Project: Camel
Issue Type: Bug
Components: camel-kafka
Affects Versions: 3.3.0
Reporter: Stefan Burkard
While trying to create a custom HeaderFilterStrategy for camel-kafka I noticed that the two methods of the strategy are used interchanged.
* The {{KafkaConsumer}} calls {{applyFilterToCamelHeaders}}
* The {{KafkaProducer}} calls {{applyFilterToExternalHeaders}}
According to the [HeaderFilterStrategy Interface|https://github.com/apache/camel/blob/b9a3117f19dd19abd2ea8b789c42c3e86fe4c488/core/camel-api/src/main/java/org/apache/camel/spi/HeaderFilterStrategy.java], it should be the other way round.
I guess this bug is there since the beginning of the component (therefore affects all released versions).
Since this is just a method switch, it is a perfect exercise for me to clone/build the camel source and send a pull request.
As easy as the code is to fix, this is sort of a breaking change for all existing (intentionally wrong) custom HeaderFilterStrategies for camel-kafka.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)