question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mqtt client doesn't receive QOS 0 or QOS 1 messages sporadically.

See original GitHub issue

System Information

  • Aedes: 0.42.5
  • NodeJS: 12.16.1
  • OS: Ubuntu 18.04
  • Arch: x86_64

Describe the bug Mqtt client doesn’t receive QOS 0 or QOS 1 messages sporadically. I can reproduce using the following code

var mqtt = require('mqtt');
// let mqtClient = mqtt.connect('mqtt://broker.emqx.io');  this mqtt broker works perfectly
let mqtClient = mqtt.connect('mqtt://backend.com', {
    username: 'user-432423',
    password: 'c307a13d-ccf3-324-bc17-7182162e5682'
});  
setInterval(()=> {
    let randomNumber = Math.round(Math.random() * 100000) + '';
    mqtClient.publish('/5f3f3fafe4d74c00161dda2c/1', randomNumber, { qos: 1})
    mqtClient.publish('/5f3f3fafe4d74c00161dda2c/2', randomNumber, { qos: 1})
    mqtClient.publish('/5f3f3fafe4d74c00161dda2c/3', randomNumber, { qos: 1})
    mqtClient.publish('/5f3f3fafe4d74c00161dda2c/4', randomNumber, { qos: 1})    
}, 2 * 1000);

broker.emqx.io broker always sends messages but aedes sometimes miss the delivery to the client I am using mqttfx as client, mongo-persistenance and mongo-emitter Sometimes the client only receives 3 out of 4 messages. 1 goes missing every minute or so.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
moguptacommented, Sep 7, 2020

@robertsLando was on vacation. Will try it out soon.

0reactions
robertsLandocommented, Sep 14, 2020

@mogupta With mqemitter-mongodb@7.0.4 everything should work perfectly!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quality of Service (QoS) 0,1, & 2 MQTT Essentials: Part 6
QoS is a key feature of the MQTT protocol. QoS gives the client the power to choose a level of service that matches...
Read more >
Understanding MQTT QOS Levels- Part 1
A closer look at MQTT QOS levels and message flow. We simulate network failure and show how it results in duplicate messages for...
Read more >
Qualities of service provided by an MQTT client - IBM
The telemetry (MQXR) service does not discard messages sent with QoS=0 . They are stored as nonpersistent messages, and are only discarded if...
Read more >
MQTT Quality of Service (QoS) - M2MSupport.net
When a MQTT client publishes with QoS 1, the MQTT broker does not acknowledge the receipt, QoS level 0 is sometimes called “fire...
Read more >
Introduction to MQTT QoS (Quality of Service) - EMQ
When QoS is 0, the publish of messages depends on the capabilities of the underlying network. The publisher will publish the message only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found