Hello,
we have problems with our MQTT inbound processing, after updating from Spring Boot 3.5.9 to 3.5.10. Problem is the update of spring-integration-mqtt.
In what version(s) of Spring Integration are you seeing this issue?
6.5.6 (after update from 6.5.5)
Describe the bug
After the update, topic subscriptions which having wildcards in the topic definition will not working any longer. The messages will be filtered cause of this new IF-Condition:
|
boolean subscribed = Arrays.asList(getTopic()).contains(topic); |
.
Problem is that the topic, the message is sent to, is not completely equal to the subscribed topic, so that the contains method will not work here.
For example:
Subscription is CONFIG/# and the message will be sent to CONFIG/1. This should work, but it doesn't.
I’m not sure if the condition is really needed, because before the callback call it was checked already. But I’m not so deep inside the code. So when it is needed, in my opinion it has to consider MQTT topic wildcards (+ and #) in the subscription.
Regards
Nikolai
Hello,
we have problems with our MQTT inbound processing, after updating from Spring Boot 3.5.9 to 3.5.10. Problem is the update of spring-integration-mqtt.
In what version(s) of Spring Integration are you seeing this issue?
6.5.6 (after update from 6.5.5)
Describe the bug
After the update, topic subscriptions which having wildcards in the topic definition will not working any longer. The messages will be filtered cause of this new IF-Condition:
spring-integration/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/MqttPahoMessageDrivenChannelAdapter.java
Line 372 in 205ddd1
Problem is that the topic, the message is sent to, is not completely equal to the subscribed topic, so that the contains method will not work here.
For example:
Subscription is CONFIG/# and the message will be sent to CONFIG/1. This should work, but it doesn't.
I’m not sure if the condition is really needed, because before the callback call it was checked already. But I’m not so deep inside the code. So when it is needed, in my opinion it has to consider MQTT topic wildcards (+ and #) in the subscription.
Regards
Nikolai