Skip to content

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

@caoqingguang

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?

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