eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.12k stars 883 forks source link

Allowing shared subscriber group topics to match #911

Open nwest1 opened 2 years ago

nwest1 commented 2 years ago

This looked to be a bug to me.

When I was configuring a client, and used $share/groupname/topic as the topic, no messages would be delivered.

I traced it down to here: https://github.com/eclipse/paho.mqtt.java/blob/master/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/internal/CommsCallback.java#L611

At that point, the message would have come from topic, which does not match $share/groupname/topic, and the message would be left undelivered.

possibly related https://github.com/eclipse/paho.mqtt.java/issues/827

Thank you for your time!

Signed-off-by: Nathan West Nathan.West@target.com

Please make sure that the following boxes are checked before submitting your Pull Request, thank you!

klausbetz commented 1 year ago

@icraggs, @rdasgupt: Are there any plans to merge this PR?

This seems to be a rock-solid implementation of a MQTT Client.
It would be really helpful when this bug is fixed. Until now (v1.2.5) consumers of this package need to provide a custom callback just to get shared subscriptions to work.

wilx commented 7 months ago

I have hit this exact issue today. The suggested patch looks like it should fix the issue. Why is this not merged yet?