eclipse-paho / eclipse-paho/paho.mqtt.java

Shared subscription not working correctly

Open
#827 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

- [x] Bug exists Release Version 1.2.5 ( Master Branch)
- [ ] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
- [ ] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)

When receiving a message on a [shared subscription](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901250) the registered `IMqttMessageListener.messageArrived(` isn't called. Instead the registered `MqttCallback.messageArrived(` is called. Workaround could be to subscribe as shared and non-shared subscription.

Reproduce:
1. subscribe to topic `$share/group1/any/topic`
2. send message to to topic `any/topic`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the shared subscription `$share/group1/any/topic` and a message sent to `any/topic` in the Java MQTT client. Trace how messages are dispatched between `IMqttMessageListener.messageArrived` and `MqttCallback.messageArrived`; done means shared-subscription messages invoke the registered listener as expected, with regression coverage for the reported reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.