eclipse-paho / eclipse-paho/paho.mqtt.java
Unexpected behavior while using multi level wildcard # for the subscriber application.
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
We are connecting to HiveMQ cluster using paho client V5 i.e org.eclipse.paho.mqttv5.client-1.2.5.jar.
While we were evaluating the multi level wildcard feature for the subscriber we observed a discrepancy in behavior.
Here is a short descripton of the use case:
Expected behavior: The subscriber using a topic filter with the # wildcard (e.g., **_topic/level/#_**) should only receive messages from topics that match the specified hierarchy (i.e., topics starting with **_topic/level/_**).
ref https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901245
Actual behavior:
The subscriber is receiving messages from topics that do not follow the expected hierarchy, meaning topics with a different path structure (e.g., **_topic/otherlevel/...)_** are also being subscribed .
Could this be a valid item for a defect? Please let us know if any additional information is required. FYI, we register a callback to receive the messages.
Contributor guide
Research direction
Start with the org.eclipse.paho.mqttv5.client-1.2.5.jar subscriber setup and the registered callback, then reproduce the topic filter topic/level/# against messages under topic/level/ and topic/otherlevel/. Compare the observed subscriptions with the MQTT v5 wildcard rules; done means messages outside the specified hierarchy are not delivered, with a minimal reproduction available.
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
- Needs clarification
- Newbie friendliness
- 28/100