Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-8879: Add MQTT subscription identifier
Fixes: #8879 To work around the problem with `$share/` subscriptions the `Mqttv5PahoMessageDrivenChannelAdapter` must provide a `subscriptionIdentifier` into `MqttProperties` on `subscribe()` * Introduce a `Mqttv5PahoMessageDrivenChannelAdapter.subscriptionIdentifierCounter` according to the MQTT specification: > 3.8.2.1.2 Subscription Identifier: [..]The Subscription Identifier is associated with any subscription created or modified as the result of this SUBSCRIBE packet. If there is a Subscription Identifier, it is stored with the subscription. This one is associated with the MQTT session for the current subscriber and does not interfere into other sessions even if identifier is same from the counter. It works because the Subscription identifier is per session and because you cannot have multiple connection with the same client ID. **Cherry-pick to `6.2.x` & `6.1.x`** # Conflicts: # spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/Mqttv5PahoMessageDrivenChannelAdapter.java
- Loading branch information