Duplicated messageId
lacourte opened this issue · 0 comments
lacourte commented
This problem has been raised in the context of a test program, publishing a very large number of QoS 1 messages. It triggers the following message:
java.net.ProtocolException: Command from server contained an invalid message id:
When a QoS 1 PUBLISH message is sent, an entry is created in the requests table of CallbackConnection. The entry is removed when the matching PUBACK message is processed. If for any reason the broker is slowed down, the messageId counter of the client may loop, and a second message with the same messageId may be sent while the first message is still in the requests table. The corresponding entry in the table is then overridden and the client is then corrupted.