oscerd commented on PR #26890: URL: https://github.com/apache/camel/pull/26890#issuecomment-5874369812
Closing this. @davsclaus and gnodet-bot are right, and I checked it against the code. `HiveMQConsumer.onMessage()` puts exactly three headers on the exchange: `CamelHiveMQTopic`, `CamelHiveMQQos` and `CamelHiveMQRetained`. Their names are fixed, and their values come from the MQTT publish metadata. It does not map MQTT5 user properties or any other sender-chosen name onto the exchange, and it never sets `CamelHiveMQOverrideTopic`. A publisher therefore has no way to inject a `Camel*` header, so there is nothing for an inbound `HeaderFilterStrategy` to block. Applying `DefaultHeaderFilterStrategy` to those three headers filtered the component's own headers away. That is why `HiveMQComponentPubSubIT`, `HiveMQOverrideTopicIT` and `HiveMQQosAndRetainIT` failed with "Exchange 0 has no headers". Without user-property mapping, a `headerFilterStrategy` option would have nothing to act on. paho-mqtt5 and nats follow the same rule: they set their own `Camel*` headers directly and filter only externally named headers. If MQTT5 user-property mapping is added later, it should come with a strategy that applies only to those entries. CAMEL-24998 will be resolved as Not A Problem. _Claude Code on behalf of @oscerd_ -- 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]
