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

MQTT subscriptions doesn't work

Open
#707 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

mqttc.subscribe(topicName, 1, null,iMqttActionListener, iMessageListener);

I tried to subscribe with passing the topic name, qos status, context null , action listener and message listener. It doesn't return any action call back status. What was the issue ?

private IMqttMessageListener iMessageListener= new IMqttMessageListener() {
@Override
public void messageArrived(String topic, MqttMessage message) throws Exception {
}
}

IMqttActionListener iMqttActionListener = new IMqttActionListener() {
@Override
public void onSuccess(IMqttToken asyncActionToken) {
Log.e("onSuccess","Fired");
}

@Override
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
Log.e("onFailure","Fired");
}
};

- [ ] Bug exists Release Version 1.2.2 ( Master Branch)
- [ ] Bug exists in MQTTv3 Client on Snapshot Version 1.2.3-SNAPSHOT (Develop Branch)
- [ ] Bug exists in MQTTv5 Client on Snapshot Version 1.2.3-SNAPSHOT (Develop Branch)

If this is a bug regarding the Android Service, please raise the bug here instead: https://github.com/eclipse/paho.mqtt.android/issues/new

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.