-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
Status: AvailableNo one has claimed responsibility for resolving this issue.No one has claimed responsibility for resolving this issue.
Description
It seems that missed messages are not forwarded to persistent sessions on reconnect, using mosquitto_sub with options -c
and -i
sets with a Qos of 2 and messages published with a Qos of 2 or 1.
I have seen this behavior with mosquitto 2.0.15 and 2.0.20 in docker
with the following configuration.
per_listener_settings true
listener 1883
allow_anonymous true
protocol mqtt
max_queued_messages 1000
#Same behavior `queue_qos0_messages true`
queue_qos0_messages true
#Same behavior without persistence
persistence true
the compose file used to start the service
name: "mosquitto"
services:
mosquitto-1:
image: "eclipse-mosquitto:2.0.15-openssl"
user: "1000:1000"
volumes:
- "./mosquitto.conf:/mosquitto/config/mosquitto.conf"
ports:
- 1883:1883
and there is the script used to test the behavior of persistent session
#/bin/sh
mosquitto_sub -h localhost -p 1883 -c -i persistent -t "greetings" -q 2 -v -d &
sub_pid=$!
mosquitto_pub -h localhost -p 1883 -c -i publisher -t "greetings" -m "hi" -q 2 -d
sleep 1
kill $sub_pid
sleep 1
mosquitto_pub -h localhost -p 1883 -c -i publisher -t "greetings" -m "hi no subscriber" -q 2 -d
sleep 1
mosquitto_sub -h localhost -p 1883 -c -i persistent -t "greetings" -q 2 -v -d &
sub_pid=$!
sleep 10
kill $sub_pid
I need this feature for a project, may you explain what i missed to have it working ?
Metadata
Metadata
Assignees
Labels
Status: AvailableNo one has claimed responsibility for resolving this issue.No one has claimed responsibility for resolving this issue.