Asking about anyones experience with connecting node-red MQTT to AWS Iot Core

Looking for folks that have this setup :slight_smile:

I'm curious about the 'use clean session'

We have nodes that are publishing and subscribing
Based on this post I think we want to uncheck use clean sessions

Persistent Session

  • The client has limited resources. You want the broker to store the subscription information of the client and restore the interrupted communication quickly.
    &

Clean session

  • The client needs only to publish messages to topics, the client does not need to subscribe to topics.

Also, any recommendations on setting the 'Keep alive Time' (this value is pretty confusing to me, I first read it as it would send a keep alive every 60 seconds which is of course completely wrong) after more reading I find you multiply it by 1.5 and after that timer expires AWS broker will disconnect the device.

Also, does node-red mqtt send PINGREQ or should you handle that by sending a keep alive message.

Thanks for any recommendations, I appreciate it!

Anyone use clean sessions with AWS Iot Core? Does node-red mqtt send a PINGREQ?

I joined a project where we will be communicating Node-RED with AWS IoT core, via MQTT. The development is ongoing so there is nothing in production yet. Our devices only publish to AWS therefore we use clean sessions and all seems good so far (as long a we don´t set the wrong qos).

In regards to PINGREQ normally this is a concern for library developers. Normal users (like me) would not need to bother. I believe that the protocol is handled by a Node module so not really something configurable in Node-RED.

Perhaps you can have a look on the issue log of the module to see if there is any known issue or bug ?

1 Like

It seems that setting the MQTT connection to AWS with "Use clean session" turned off is working

1 Like

PINGREQ is part of mqtt specification:

Any mqtt client is sending these packets (as part of the spec). The Server has to answer with a PINGRESP.

Unless you're developing your own mqtt client / broker, there's nothing to need to do. The mqtt client of your choice will send the REQs, and the AWS monolith will manage to answer it with RESPs.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.