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

messageId Can't get normal feedback

Open
#865 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

Var:V5_1.2.5

When I use this version, the ID set by the message can't give correct feedback in the arrival callback, and always returns a self incrementing ID.

Send code
MqttMessage message = new MqttMessage();
message.setId(code);
message.setPayload(payload);
mqttAsyncClient.publish(TOPIC_PUBLISHER, message);
Callback code for delivery
MqttCallback > deliveryComplete
iMqttToken.getMessageId();

Contributor guide

Open the contributing guide

Research direction

Start by tracing MqttMessage.setId(code) through mqttAsyncClient.publish and the deliveryComplete callback, focusing on iMqttToken.getMessageId(). Reproduce the reported behavior with version V5_1.2.5 and verify that the callback returns the message ID set by the caller rather than an unexpected incrementing ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.