Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mosquitto: Outgoing messages are being dropped

First, I'll start by telling that this question is a refinement of Mosquitto not propagating messages to AWS IoT using bridge configuration, so lots of context and logs could be found on that question too, but I decided to start a new one as I guess I found a real symptom of the actual problem, which I prefer to handle it alone to avoid confusion with other possible issues:

Mosquitto (/var/log/mosquitto/mosqutto.log) log files were actually disabled and, the only available logs where from /var/log/syslog but, when we enabled them, and issued a cat mosquitto.log|grep bridge, some relevant messages appeared:

1.- Bridge local.bridgeawsiot doing local SUBSCRIBE on topic #

Which tells that all topic are being bridged

2.- Connecting bridge awsiot (myEndpoint.iot.us-east-1.amazonaws.com:8883)

Which tells that it's using the correct endpoint

3.- Outgoing messages are being dropped for client local.bridgeawsiot.

Which worries me a lot, as I don't really know why is that happening, but seems like a clear symptom of the problem, but after a few searches I found:

"The message "Outgoing messages are being dropped" is shown when the internal message queue become full.", so I guess messages are just being enqueued but not actually being sent to AWS IoT.

So my questions are:

  1. Why are these messages are being dropped?
  2. If they are being dropped because queue is full, then why queued messages are not being sent to the bridged endpoint?

Relevant info:

Version: 1.4.14-0mosquitto1~jessie2
OS: Debian GNU/Linux 9.1 (stretch)
like image 784
gvasquez Avatar asked Mar 06 '18 12:03

gvasquez


1 Answers

Not sure if we have the same issue but mine was resolved when I added into mosquitto.conf

max_queued_messages 0

From man mosquitto.conf

The maximum number of QoS 1 or 2 messages to hold in the queue (per client) above those messages that are currently in flight. Defaults to 100. Set to 0 for no maximum (not recommended). See also the queue_qos0_messages and max_queued_bytes options. Reloaded on reload signal.

like image 130
Vitaliy Avatar answered Nov 02 '22 16:11

Vitaliy