Skip to content

how I kown the server publish message (use qos1) is success  #85

Description

@caoqingguang

when I publish message1 use method
MqttEndpoint publish(topic, Buffer payload, qosLevel, isDup, isRetain);

and i can get messageId by method
int lastMessageId()

and i kown one message is success when i get

client.publishAcknowledgeHandler(id->{
   String msg = getMailBox(client).getMsg(id);
   System.out.println("success:"+id+", msg:"+msg);
});

but in multi thread , the messageId maybe not the real messageId, when an other thread send message2 at same time

so if i want get real messageId for message1, i must use lock, is that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions