[bug] unable to publish with in memory mqemitter after some mqtt clients connected
See original GitHub issueSystem Information
- Aedes: 0.44.0
- NodeJS: 12.13.1
- OS: Ubuntu 18.04
- Arch: x86_64
Describe the bug
Unable to publish after clients connected and publish some messages while using default in memory mqemitter.
To Reproduce
Default mqemitter
concurrency number is 100
in aedes so it happened when more clients connected, it’s easy to reproduce it when concurrency
set to 2
.
Steps to reproduce the behavior:
$ git clone git@github.com:JaosnHsieh/aedes-unable-to-publish.git
$ npm install
$ npm run server
$ npm run client
Expected behavior
No matter what concurrency
number set to aedes, it should be able to publish message.
Additional context
I expect this._messageQueue
length in mqemitter
should decrease as time goes but it doesn’t.
Current work around I just change concurrency number to 10,000 so it always skip this condition.
I saw mqemitter
exposed message queue length but didn’t see any code in aedes
check this value.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
IT17751: MQTT server fails to publish LWT messages to ... - IBM
MQTT server fails to publish a 'last will and testament' (LWT) message to subscribers when client loses connectivity.
Read more >Memory allocation problem after successive MQTT ...
After repeated mqtt connection-disconnection processes,I have the problem of code -12 and it is impossible to connect with the MQTT broker ...
Read more >Why MQTT generates the "Operator new out of memory" failure?
Hi guys, I am facing a problem with the MQTT protocol. After publishing several messages the program stops the execution and prints the...
Read more >How to build your own MQTT broker in Nest.js
Invoked when server receives a valid CONNECT packet. authenticate, Invoked after preConnect . authorizePublish, publish LWT to all online ...
Read more >MQTT Retained Messages Explained - Steve's internet Guide
If the publishing client dies ( say due to a power issue or memory leak), I'd like the client to reboot and then...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
it doesn’t happen too often due to default concurrency
100
which able to handle quite a lot of messages. Set to2
for easier reproduce only.Couldn’t see errors either on broker side or mqtt.js client side.
server.js
client.js
Share with someone who also encountered same issue.
Closing as dup of #666