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

Paho leaves messages in unacked state when starting up

Open
#595 6 comments 0 reactions 1 assignee Claimed by @icraggs View on GitHub
enhancement
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

- [ x ] Bug exists Release Version 1.2.0 ( Master Branch)

When the application that uses paho library is starting up, it has successfully connected to the broker, but has not got a chance to subscribe any topics yet. The broker (RabbitMQ MQTT) will send the retained messages to this client, and paho simply ignores these messages causing the messages to stay in unacked state in the broker and the client is unable to process these messages.

This is the condition when a given message arrives
```
if (mqttCallback != null || callbacks.size() > 0) {
....
}
```
Anyone has any suggestions how to handle this?

Thanks
Thinh

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.