oscerd opened a new pull request, #23905:
URL: https://github.com/apache/camel/pull/23905
## Backport of #23886
Cherry-pick of #23886 (squash commit `72d13bd13fb`) onto `camel-4.14.x`.
- **Original PR:** apache/camel#23886 โ CAMEL-23630: add
HeaderFilterStrategy to camel-dapr
- **Original author:** @oscerd
- **Approved by:** @davsclaus
- **Target branch:** `camel-4.14.x` (4.14.8-SNAPSHOT)
### 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 #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](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]