Aedes stops exactly after 100 messages
See original GitHub issueHello, I didn’t open a bug issue because it’s probably something wrong with my code. I have two clients connected to aedes, one to publish and one to receive the messages, but after 100 messages aedes stops receiving. Below my aedes server code:
const aedes = require('aedes')()
const server = require('net').createServer(aedes.handle)
const port = 1883
const initAedes = () => {
server.listen(port, function () {
console.log('Mqtt server started and listening on port ', port)
})
aedes.subscribe('consumption', function (packet, cb) {
console.log('Received: ', packet.payload.toString());
});
}
My publisher:
client.on('connect', function () {
client.subscribe('consumption');
let ctr = 0;
setInterval(() => {
ctr++;
console.log('publishing: ' + ctr);
client.publish('consumption', ctr.toString());
}, 100);
})
My receiver:
client.subscribe('consumption');
client.on('message', function (topic, message) {
console.log('Received: ' + message.toString())
})
Sorry if I misunderstood something, I’m a newbie.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Aedes stops responding after 99 messages when a client has ...
The correct way of operation when concurrency limit was hit, is to deliver queued messages and then continue accepting new. Today I've ...
Read more >Getting Eaten Alive By Mosquitoes? Here's All You Ever ...
The relentless Aedes mosquito has been spotted in a host of places — Los Angeles, Orange, Riverside, San Bernardino, San Diego, Tulare, Merced ......
Read more >How to Install and Run The Aedes MQTT Broker on Node-Red
Click on the install tab and search for aedes. aedes-broker-location. After the install you should find a new node called aedes under the ......
Read more >Species Elimination Is Usually Not A Good Idea - NPR
Aedes aegypti are not a big food source for animals, and they don't pollinate plants. "There's been lots of debate in the last...
Read more >Genetically Modified Mosquitoes Have Come to the U.S. | Time
U.K.-based biotech firm Oxitec is releasing genetically modified mosquitoes in the Florida Keys as population control. Will they work?
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
You are not calling the callback inside the function you pass to subscribe.
https://github.com/moscajs/aedes/blob/master/docs/Aedes.md#aedessubscribe-topic-deliverfunc-callback