marvinroger/async-mqtt-client

Doesn't receive (onMessage callback) retained Message after subscription

tobiasjaster opened this issue · 2 comments

I am trying to handle short mqtt connections between long (60s) deep sleep sessions.

Sequence:

Start
WiFi connect, wait connected
Mqtt set callbacks
Mqtt connect, wait connected
Get variables from ulp and publish
Disconnect mqtt & wifi
Start Deep Sleep

Before mqtt connect I subscribe to an update-request. After connection I would like to handle incoming retained topic, but never receive anything.

Anyone getting retained Message working?

You can only subscribe/publish/unsubscribe when connected.

Doesn't get the topics retained message, if I subscribe after WiFi und mqtt connected