eclipse/paho.mqtt.c

QoS and retain both set to 1 then MQTT Client goes to MQTT Close session after time greater than keep alive interval and then reconnection

sayali-gadre opened this issue · 0 comments

I am using the MQTT Client library for publishing and subscribing messages to IoT Core service of the AWS Cloud.

When continuously publishing MQTT messages for a topic with QoS and retain flag set to 1, the messages stop publishing after client ID 17 (serially), then client goes to close session after almost twice of keepalive interval (till then task is suspended) and then to reconnection again. After reconnection, same process repeats 2-4 times and then, the task stops.

When seen in debug, time is stuck in PUBACK timer wait function which calls for reading the type of packet. The MQTT task in FreeRTOS gets blocked for that time interval.

Is there any minimum wait period required for PUBACK if publishing to the same topic continuously?
If delay of 1s is given each time after publishing to the topic, then, it works properly without any issue. It is not the issue when retain flag is not set.

Could you please provide some insights into this? Thank you in advance.