EG21-G Not able to retain messages from MQTT

Hi Quectel,

I am using EG21-G quectel modem , we have a project where we connect MQTT periodically for every 60 minutes. while we connect to MQTT we are subscribing to HTTP also.we are using Qos 1

Problem

Whenever we send command from HTTP to MQTT when MQTT connection is alive on that time am getting ack from device. we are not facing any issue here

When the MQTT is disconnected on that time we trying to send command from HTTP to MQTT broker in this time we are not getting any ack from device. we are thinking MQTT is not retaining the message and not delivering to device when MQTT reconnects.

For example: We have 1 hour of time in that only MQTT can alive only to 2 to 3 mins for battery saving in this time we configured the firmware

  1. To post the data from device to HTTP
  2. as well whatever we send command from HTTP to Device we need to get ack from device.

1st point is working fine
2nd point is working only when MQTT is alive of 2 to 3 minutes but when we send message when MQTT is disconnected. MQTT is not retaining any messages to send to device.

Please help on this
If possible please share AT command sequence to retain the message from MQTT.

Thanks in advance for your help

hi,
What you want is for the device to disconnect from the MQTT broker. Does the broker still need to save the device information? Can you provide the specific at command process?