paho.mqtt.java icon indicating copy to clipboard operation
paho.mqtt.java copied to clipboard

Allowing shared subscriber group topics to match

Open nwest1 opened this issue 3 years ago • 3 comments

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 [email protected]

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

  • [x] This change is against the develop branch, not master.
  • [x] You have signed the Eclipse ECA
  • [x] All of your commits have been signed-off with the correct email address (the same one that you used to sign the CLA) Hint: use the -s argument when committing.
  • [x] If This PR fixes an issue, that you reference the issue below. OR if this is a new issue that you are fixing straight away that you add some Description about the bug and how this will fix it.
  • [x] If this is new functionality, You have added the appropriate Unit tests.

nwest1 avatar Jan 28 '22 03:01 nwest1

@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.

klausbetz avatar Nov 21 '22 22:11 klausbetz

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

wilx avatar Feb 01 '24 13:02 wilx