Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manual acknowledgement results in duplicate pubcomp #1054

Open
1 of 3 tasks
whizyrel opened this issue Aug 1, 2024 · 0 comments
Open
1 of 3 tasks

manual acknowledgement results in duplicate pubcomp #1054

whizyrel opened this issue Aug 1, 2024 · 0 comments

Comments

@whizyrel
Copy link

whizyrel commented Aug 1, 2024

Please fill out the form below before submitting, thank you!

  • Bug exists Release Version 1.2.5 ( Master Branch)
  • Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
  • Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-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

ISSUE DESCRIPTION
Setting manual acknowledgement to true and calling the message arrived complete method results into duplicate pubcomp and the connection gets disconnected. In short, manual acknowledgement is not possible.

SNIPPET TO REPRODUCE

var client = ...;

client.setManualAcks(true);

client.setCallback(new MqttCallback() {
   ...
   @Override
   public void messageArrived(String topic, MqttMessage message) {
      ...
      client.messageAriveComplete(message.getId(), 2);
      ...
   }
   ...
});

client.subscribe(...);

Result

Creating MqttPubComp due to manual ACK: MqttPubComp [returnCode=0, properties=MqttProperties [validProperties=[...]]]
Creating MqttPubComp: MqttPubComp [returnCode=0, properties=MqttProperties [validProperties=[...]]]
MqttDisconnectResponse [returnCode=0, reasonString=null, userProperties=null, serverReference=null, exception=Connection lost (32109) - java.net.SocketException: Connection reset]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant