keep alive timer of MQTT

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AkKo_4458241
Level 2
Level 2

Hello.

I want to change the settings of the keep alive timer of MQTT,

Should I change the defined value of "WICED_AWS_MQTT_KEEP_ALIVE_TIMEOUT" in "aws_common.h"?

Is there a setting value range?

I want to set it to 600 seconds, but it will be disconnected 600 seconds after the last access.

Is there a solution?

Thank you.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

The connection inactivity (keep-alive interval) for MQTT connections is between 30-1200 seconds as part of the MQTT CONNECT message for AWS IOT.

Following link should help

https://docs.aws.amazon.com/iot/latest/developerguide/limits-iot.html

Following attached code should help

In the sample code, if the button isn't pressed to publish within keep alive time the connection is closed.

Thanks and Regards

View solution in original post

0 Likes
4 Replies