Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] When will message with QoS = 0 message lost

On Thu, Feb 8, 2018 at 7:11 PM, Michael CHEN <Michael.Chen@xxxxxxxxxxxxxxxxxxxxxx> wrote:


            I know that a message with QoS = 0, there is no guarantee that the message will be delivered to subscriber.

            However, since mqtt is built on the tcp/ip protocol which will retransmit if package is lost, so I still want to understand in which case the message will be lost and possible way to avoid it or improve it.

The environment in our scenario:

Running mosquitto in a linux system (an embedded system), with 3 clients connected with wire. This is a private network, so no other network traffic, only mqtt message is using the network. And the size of each package is very small < 50 bytes for each package

            In this scenario, if message is not delivered, it’s because the size of message queue in mosquitto is not big enough?

Define "big enough"
Maybe your clients can not consume message quickly enough? 
Maybe the broker needed to do something else for a short time instead of handling 3000 msg/s. 

Should a broker queue a lot of messages with QoS=0 ? I think it should not. 
QoS=0, so it follows the specification.
If you think it should queue alot of message, why would that be?
I you need garanteed delivery maybe you should not use QoS=0.
If your use-case needs garanteed delivery, use a appropriate QoS level.

Just my opinion, $ 0.02 value etc.
Edwin van den Oetelaar

            In our performance test, we are seeing that message lost when throughput higher than 3000 message/second.


Michael Chen

Back to the top