[backport camel-4.14.x] CAMEL-23630: add HeaderFilterStrategy to camel-dapr#23905
Merged
oscerd merged 1 commit intoJun 10, 2026
Merged
Conversation
Adds a DaprHeaderFilterStrategy (extending DefaultHeaderFilterStrategy) exposed via DaprComponent / DaprEndpoint as the standard headerFilterStrategy option, aligning camel-dapr with the rest of the messaging-component family (camel-iggy, camel-kafka, camel-jms). The dapr-pubsub consumer no longer copies the inbound CloudEvent's pubsubName / topic into the CamelDaprPubSubName / CamelDaprTopic headers. Those two constants are producer-direction routing headers that DaprConfigurationOptionsProxy reads back and prefers over the endpoint-configured destination, so a from(dapr-pubsub).to(dapr-pubsub) route incorrectly carried the inbound destination into the producer hop. The remaining CloudEvent metadata headers are unchanged. Documented in the 4.21 upgrade guide. (cherry picked from commit 72d13bd)
davsclaus
approved these changes
Jun 10, 2026
oscerd
added a commit
to oscerd/camel
that referenced
this pull request
Jun 10, 2026
…de guide The dapr-pubsub consumer header change (CAMEL-23630) was backported to camel-4.14.x (apache#23905) and ships in 4.14.8. Per the backport upgrade-guide policy, document it in camel-4x-upgrade-guide-4_14.adoc on main (the canonical upgrade-guide history), mirroring the 4_18 and 4_21 entries. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
oscerd
added a commit
that referenced
this pull request
Jun 10, 2026
…de guide (#23907) The dapr-pubsub consumer header change (CAMEL-23630) was backported to camel-4.14.x (#23905) and ships in 4.14.8. Per the backport upgrade-guide policy, document it in camel-4x-upgrade-guide-4_14.adoc on main (the canonical upgrade-guide history), mirroring the 4_18 and 4_21 entries. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #23886
Cherry-pick of #23886 (squash commit
72d13bd13fb) ontocamel-4.14.x.camel-4.14.x(4.14.8-SNAPSHOT)What this backports
Adds
DaprHeaderFilterStrategy(exposed viaDaprComponent/DaprEndpointas the standardheaderFilterStrategyoption) and stops thedapr-pubsubconsumer from copying the inbound CloudEvent'spubsubName/topicinto theCamelDaprPubSubName/CamelDaprTopicheaders. Those two constants are producer-direction routing headers thatDaprConfigurationOptionsProxyreads back and prefers over the endpoint-configured destination, so afrom(dapr-pubsub).to(dapr-pubsub)route incorrectly carried the inbound destination into the producer hop. The remaining CloudEvent metadata headers are unchanged.Backport notes
camel-4x-upgrade-guide-4_21.adoc, which does not exist oncamel-4.14.x. Per project policy, upgrade-guide entries live onmain; the matchingcamel-4x-upgrade-guide-4_14.adocentry onmainis handled in the doc-sync PR CAMEL-23630: Document camel-dapr 4.18.x consumer header change in 4.18 upgrade guide #23891.mainthan 4.18.x did):DaprEndpoint.java: kept the 4.14.x@UriEndpointannotation formatting and addedimplements HeaderFilterStrategyAware; the rest of the endpoint change (imports, theheaderFilterStrategy@UriParam, getter/setter) applied cleanly.DaprComponentConfigurer,DaprEndpointConfigurer,DaprEndpointUriFactory, componentdapr.json, and the catalog mirror) were regenerated from source on this branch rather than taking the 4.21 versions, so they match 4.14.x codegen.mvn -pl components/camel-dapr clean installon acamel-4.14.xworktree — BUILD SUCCESS, 28 tests pass (incl.DaprPubSubConsumerTest), no regenerated-file drift.Backport prepared by Claude Code on behalf of Andrea Cosentino · 🤖 Generated with Claude Code