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

Connection closed when subscribing in QoS2 from a non-clean session #1003

Open
gmondada opened this issue Oct 1, 2024 · 1 comment
Open
Labels

Comments

@gmondada
Copy link

gmondada commented Oct 1, 2024

System Information

  • Aedes: 0.51.3
  • NodeJS: 20.16.0
  • OS: Windows 10
  • Arch: x86_64

Describe the bug
I open a session in clean=false mode.
I subscribe to a retained topic in QoS 2.
I expect to get a message from that topic because retained.
I do not get any message. In aedes log I see the client being disconnected and reconnected again.

To Reproduce
Here is a test program that reproduces the problem: https://github.com/gmondada/aedes/blob/gm-tests/test2.js
You can run it in this way:

git clone https://github.com/gmondada/aedes.git
cd aedes
git checkout gm-tests
npm i
node test2.js

Expected behavior
The test program above (test2.js) creates a broker instance, then creates a client publishing a retained topic, then creates 3 clients subscribing to that topic with different parameters. I expect to have all clients receiving the retained topic. The last one does not.
The client not receiving the topic is connected in clean=false mode and subscribes in QoS 2.

Additional context
I use a simple aedes instance, with no persistence.

@gmondada gmondada added the bug label Oct 1, 2024
@robertsLando
Copy link
Member

PR?

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