[
https://issues.apache.org/jira/browse/CAMEL-15121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Burkard updated CAMEL-15121:
-----------------------------------
Description:
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).
I have submitted the [pull request
3864|https://github.com/apache/camel/pull/3864] to fix this.
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.
was:
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.
> 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
> Priority: Minor
>
> 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).
> I have submitted the [pull request
> 3864|https://github.com/apache/camel/pull/3864] to fix this.
> 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)