The context:
Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux
Extract of mosquitto.conf:
allow_anonymous false
password_file /etc/mosquitto/passwd
log_type all
Extract of their nodeJS config:
reconnectPeriod: 30000 (ms)
keepalive: 300 (sec)
qos: 2
clean = false
(version of node mqtt module: 3.0.0)
The problem:
PUB/SUB on the topic xxx worked fine during the first few hours, but clients (SUB) suddenly stop to received messages. Clients (SUB) are well connected and subscribed to the broker.
When I check the broker #$SYS,I can see :
When I check on the "mosquitto log", I can see the broker PUBLISH message only to 3 of my 7 SUB clients... so it is understandable my 4 others clients never received the message...
What Can I do to resolve this strange problem ?
Thank for your help.
I finally find a solution to make my architecture work: I switch the Qos SUB of all my devices to Qos1 (instead of Qos2).
My conclusion is the Qos2 on SUB is not well managed by the broker if multiple subscribers on the same topic (7 in my case).
In this case: turn Qos SUB to Qos 1 and it works fine!