This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
Replies: 1 comment
-
Hi @pprakash You have to know and understand when to publish to MQTT, don't blindly send when not connected to MQTT Server That's why you have to publish only after The example is just simple example, to adapt to your special or extreme use-cases, you have to fully understand all the features / caveats. Your loop() is really causing the problem by blindly publishing. Try the unmodified original example FullyFeaturedSSL_ESP32. This is the terminal, showing when losing WiFi, reconnect, then republish normally Terminal Output
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @khoih-prog
Have been learning ESP series of controllers with MQTT. Thanks for this wonderful stack of libraries which enabled me to learn Async communications and MQTT.
Recently I stumbled on an issue with AsyncMqtt_Generic library. I tested version 1.6.1, 1.7.0 & 1.8.0 with SSL enabled. Have faced similar issue with all these versions.
Issue Description
After mqtt client connects to the server, if publish is attempted when there is a last mile disconnect on communication between the server and client, the connection doesn't recover when the network comes back.
How to Simulate the Scenario
Step 1: Configure Mqtt Client with SSL and connect to the MQTT Server
Step 2: Similar a network failure ( I pulled of the WAN cable from the router)
Step 3: Wait until the Mqtt Client times out and disconnects
Step 4: Send multiple Publish to the server
Step 5: Re-establish the network.
Platform:
ESP32-WROOM-32 Module
PLATFORM: Espressif 32 (5.3.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
Sketch
This is FullyFeaturedSSL_ESP32 will little modification.
Logs with MQTT Debug Enabled
Logs with ATCP & MQTT Debug Enabled
In the above test scenerios it crashed both the times. But in some situations the task goes into forever loop and below log is generated on ATCP.
Please let me know if you need any additional information for deep diving into this?
Beta Was this translation helpful? Give feedback.
All reactions