Skip to content

[backport camel-4.14.x] CAMEL-23630: add HeaderFilterStrategy to camel-dapr#23905

Merged
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23886-to-camel-4.14.x
Jun 10, 2026
Merged

[backport camel-4.14.x] CAMEL-23630: add HeaderFilterStrategy to camel-dapr#23905
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23886-to-camel-4.14.x

Conversation

@oscerd

@oscerd oscerd commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Backport of #23886

Cherry-pick of #23886 (squash commit 72d13bd13fb) onto camel-4.14.x.

What this backports

Adds DaprHeaderFilterStrategy (exposed via DaprComponent / DaprEndpoint as the standard headerFilterStrategy option) and stops the dapr-pubsub consumer from copying 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.

Backport notes

  • Upgrade-guide entry omitted by design. The original PR added a note to camel-4x-upgrade-guide-4_21.adoc, which does not exist on camel-4.14.x. Per project policy, upgrade-guide entries live on main; the matching camel-4x-upgrade-guide-4_14.adoc entry on main is handled in the doc-sync PR CAMEL-23630: Document camel-dapr 4.18.x consumer header change in 4.18 upgrade guide #23891.
  • Conflicts resolved (this branch diverges more from main than 4.18.x did):
    • DaprEndpoint.java: kept the 4.14.x @UriEndpoint annotation formatting and added implements HeaderFilterStrategyAware; the rest of the endpoint change (imports, the headerFilterStrategy @UriParam, getter/setter) applied cleanly.
    • The generated files (DaprComponentConfigurer, DaprEndpointConfigurer, DaprEndpointUriFactory, component dapr.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.
  • Validated locally: mvn -pl components/camel-dapr clean install on a camel-4.14.x worktree — 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

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)
@oscerd oscerd added the backport indicate that a Pull request is a backport from a fix from the main branch label Jun 10, 2026
@oscerd oscerd requested a review from davsclaus June 10, 2026 09:41
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 oscerd requested a review from davsclaus June 10, 2026 10:20
@oscerd oscerd merged commit c6fc9bb into apache:camel-4.14.x Jun 10, 2026
3 checks passed
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>
@oscerd oscerd deleted the backport/23886-to-camel-4.14.x branch June 10, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants