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

Callbacks not invoked for shared-subscriptions

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

Description

Callbacks don't get called when subscribing to [shared subscriptions](http://www.hivemq.com/blog/mqtt-client-load-balancing-with-shared-subscriptions/), e.g. `$share/group/topic`, using the `subscribe(String topicFilter, int qos, IMqttMessageListener messageListener)`API.

However, shared subscriptions work as expected when using the `setCallback(...)` API before invoking `subscribe(String topicFilter, int qos)`.

I have written a simple Java application which reproduces the issue.

https://github.com/codeasone/shared-subscriptions-issue

This issue impacts wrappers such as the Clojure library [machine-head](https://github.com/clojurewerkz/machine_head), which is what led me here...

- [ ✓] Bug exists Release Version 1.1.1 ( Master Branch)
- [ ?] Bug exists in Snapshot Version 1.1.2-SNAPSHOT (Develop Branch)

`HEAD` of `develop` branch throws exceptions with my test program suggesting a regression wrt. `1.1.x` API, which may or may not be related.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.