eclipse-paho / eclipse-paho/paho.mqtt.java
about emqx qos 2
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
i used org.eclipse.paho.client.mqttv3[1.2.5] about QoS 2 transmission action explain https://www.emqx.com/en/blog/introduction-to-mqtt-qos it seems like after the client received PUBREC it will delete the message, but the [eclipse.paho qos] source code does not delete message action it seems like below and why it did not deleted the message
ClientState.notifyReceivedAck
```java
else if (ack instanceof MqttPubRec) {
// Complete the QoS 2 flow. Unlike all other
// flows, QoS is a 2 phase flow. The second phase sends a
// PUBREL - the operation is not complete until a PUBCOMP
// is received
MqttPubRel rel = new MqttPubRel((MqttPubRec) ack);
this.send(rel, token);
}
```
ClientState.send
```java
if (message instanceof MqttPingReq) {
this.pingCommand = message;
}
else if (message instanceof MqttPubRel) {
outboundQoS2.put( Integer.valueOf(message.getMessageId()), message);
persistence.put(getSendConfirmPersistenceKey(message), (MqttPubRel) message);
}
else if (message instanceof MqttPubComp) {
persistence.remove(getReceivedPersistenceKey(message));
}
```
Contributor guide
Research direction
Start by reading ClientState.notifyReceivedAck and ClientState.send, focusing on the MqttPubRec, MqttPubRel, and MqttPubComp branches and the persistence keys shown in the report. Compare that lifecycle with the MQTT QoS 2 specification; done means documenting or reproducing the message-removal behavior and identifying whether the implementation is incorrect.
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
- 25/100