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?