oscerd opened a new pull request, #23283:
URL: https://github.com/apache/camel/pull/23283

   ## Summary
   
   `camel-xmpp` defaulted its `headerFilterStrategy` to a bare
   `new DefaultHeaderFilterStrategy()` with no configuration — at
   `XmppEndpoint.java:106` (the production path, passed into `XmppBinding`)
   and in the `XmppBinding()` no-arg constructor. The base strategy with no
   `inFilter` / `inFilterPattern` / `inFilterStartsWith` returns `false` for
   every header, so inbound XMPP message properties 
(`XmppBinding.extractHeadersFrom`,
   `applyFilterToExternalHeaders`) are copied onto the Camel `Exchange`
   as-is — including `Camel*` / `camel*` / `org.apache.camel.*` keys that
   drive component behaviour downstream.
   
   This aligns `camel-xmpp` with the rest of the component catalog
   (`camel-kafka`, `camel-mail`, `camel-coap`, `camel-google-pubsub`,
   `camel-jms`, `camel-sjms`, and `camel-nats` via CAMEL-23515) which all
   ship a dedicated `HeaderFilterStrategy` subclass.
   
   ## Changes
   
   - New `XmppHeaderFilterStrategy` following the
     `KafkaHeaderFilterStrategy` / `MailHeaderFilterStrategy` shape
     (`setLowerCase(true)`, in/out 
`setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH)`).
   - `XmppEndpoint` and the `XmppBinding` no-arg constructor now default to
     `new XmppHeaderFilterStrategy()`; the now-unused
     `DefaultHeaderFilterStrategy` import is removed from both
     (`XmppHeaderFilterStrategy` is in the same package).
   - Unit test covering inbound/outbound `Camel*` filtering, lowercase
     variants, and pass-through of non-Camel headers.
   - 4.21 upgrade-guide entry (`=== camel-xmpp`).
   
   ## Test plan
   
   - [x] Module build: `mvn -pl components/camel-xmpp -DskipTests install`
   - [x] New unit test: `XmppHeaderFilterStrategyTest` (4 tests, green)
   - [ ] CI: full reactor build + existing camel-xmpp suite
   
   ## JIRA
   
   https://issues.apache.org/jira/browse/CAMEL-23516
   
   Sibling of CAMEL-23515 (camel-nats, merged to main/4.18.x/4.14.x).
   Backports to 4.18.x and 4.14.x planned per the `fixVersions`.
   
   _Claude Code on behalf of Andrea Cosentino_


-- 
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]

Reply via email to