Skip to content

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

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

Closed
cnvvtn opened this issue Jan 11, 2023 · 3 comments
Closed
Labels

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

Copy link

This is an automated message to let you know that this issue has
gone 365 days without any activity. In order to ensure that we work
on issues that still matter, this issue will be closed in 14 days.

If this issue is still important, you can simply comment with a
"bump" to keep it open.

Thank you for your contribution.

@github-actions github-actions bot added the stale label Jul 21, 2024
Copy link

github-actions bot commented Aug 4, 2024

This issue was automatically closed due to inactivity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants