-
Notifications
You must be signed in to change notification settings - Fork 899
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Shared subscription not working correctly #827
Comments
in V1.2.4, bug also exist. Thanks you solution. Use |
This is also the case when using wildcard in topics. When |
did you want to say "Use MqttCallback instead implement IMqttMessageListener" ? |
I can also confirm that in version mqttClient.subscribe("$shared/group/some_topic/#", 1, (topic, message) -> System.out.println(topic)); instead it's required to use callbacks: mqttClient.subscribe("$shared/group/some_topic/#", 1);
mqttClient.setCallback(new MqttCallback() {
@Override
public void connectionLost(final Throwable cause) {
}
@Override
public void messageArrived(final String topic, final MqttMessage message) throws Exception {
System.out.println(topic);
}
@Override
public void deliveryComplete(final IMqttDeliveryToken token) {
}
}); |
I am still hitting this issue. Paho is the only supported MQTT client with Spring Integration and this makes it a lot less useful than it could be. |
It looks like either
|
@wilx I am using 6.3.0 version of spring-mqtt-integration, but still facing the same issue. Unable to receive message on shared topics. |
When receiving a message on a shared subscription the registered
IMqttMessageListener.messageArrived(
isn't called. Instead the registeredMqttCallback.messageArrived(
is called. Workaround could be to subscribe as shared and non-shared subscription.Reproduce:
$share/group1/any/topic
any/topic
The text was updated successfully, but these errors were encountered: