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

   ## Summary
   
   `camel-nats` defaulted its `headerFilterStrategy` to a bare
   `new DefaultHeaderFilterStrategy()` with no further configuration
   (`NatsConfiguration.java:119`). The base class with no `inFilter` /
   `inFilterPattern` / `inFilterStartsWith` configured returns `false` for
   every header, which means every inbound NATS message header is copied
   onto the Camel `Exchange` as-is — including `Camel*` / `camel*` /
   `org.apache.camel.*` keys that drive component behaviour downstream.
   
   Sibling components (camel-kafka, camel-mail, camel-coap,
   camel-google-pubsub, camel-jms, camel-sjms, …) ship a dedicated subclass
   that configures `setInFilterStartsWith("Camel", "camel", 
"org.apache.camel.")`
   and `setLowerCase(true)`. This PR aligns `camel-nats` with that
   convention.
   
   ## Changes
   
   - New `NatsHeaderFilterStrategy` following the
     `KafkaHeaderFilterStrategy` / `MailHeaderFilterStrategy` shape.
   - `NatsConfiguration` now defaults `headerFilterStrategy` to
     `new NatsHeaderFilterStrategy()`.
   - Unit test covering inbound/outbound `Camel*` filtering, lowercase
     variants, and pass-through of non-Camel headers.
   - 4.21 upgrade-guide entry under the existing `=== camel-nats`
     section.
   
   ## Test plan
   
   - [x] Module build: `mvn -pl components/camel-nats -DskipTests install`
   - [x] New unit test: `NatsHeaderFilterStrategyTest` (4 assertions)
   - [ ] CI: full reactor build + existing camel-nats unit/integration tests
   
   ## JIRA
   
   https://issues.apache.org/jira/browse/CAMEL-23515
   
   Backports planned for 4.18.x and 4.14.x per `fixVersions` on the JIRA.
   
   _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