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

The message received by the JS client is out of order after disconnection #1568

Open
cnvvtn opened this issue Jan 11, 2023 · 1 comment
Open

Comments

@cnvvtn
Copy link

cnvvtn commented Jan 11, 2023

After repeated testing, 4.3.7 has repeated the bug in both cdn and npm, while 4.1.0 introduced into cdn does not have this phenomenon

Repeat the steps for this problem

  1. Client A goes offline
  2. Client B sends A message to A, such as aa, bb, cc, and dd
  3. The client receives the dd, cc, bb, aa message after reconnecting to the client
  4. In normal cases, the message that the client reconnects should be aa, bb, cc, dd

That is just the opposite, I think it is the js logic problem, does not conform to the official document said message queue reconnection principle of first in, first out, resulting in the last message is the first to be received

Problem log: Obviously, the operation log has caused the problem, such as in the red box, the last message sent is the first message received back, so I don't think it is the user code logic.
image

Normal log:
Using the link is pointing to js code: https://cdn.bootcdn.net/ajax/libs/mqtt/4.1.0/mqtt.min.js
The logging should look like this:
image

Hope it gets noticed and fixed in the new version! Versions for other languages have not yet been tried.

@robertsLando
Copy link
Member

MQTT 5.0.0 BETA is now available! Try it out and give us feedback: npm i mqtt@beta. It may fix your issues

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

2 participants