Hi.
I’m using the esp-idf framework in platformio. In general it works fine for me, but I figured out that sending a mqtt message to the ESP32 without payload (len=0) is received by the client, but not handed over to the subscription user. I googled it on the esp-idf GitHub repository and found a communication on this with a suggested bug fix:
esp-mqtt: receiving messages with empty payload (IDFGH-651) · Issue #3088 · espressif/esp-idf · GitHub
It also mention that it was already integrated to the stack. Is it possible, that this wasn’t included so far in the libraries platformio is using?
Error case: topic: std/dev98/r/0/gen/cmd, payload:
D (1119588) MQTT_CLIENT: msg_type=3, msg_id=0
D (1119588) MQTT_CLIENT: msg_type=3, msg_id=0
D (1119588) MQTT_CLIENT: deliver_publish, message_length_read=25, message_length=25
Good case: topic: std/dev98/r/0/gen/cmd, payload:“iii”
D (1234688) MQTT_CLIENT: msg_type=3, msg_id=0
D (1234688) MQTT_CLIENT: msg_type=3, msg_id=0
D (1234688) MQTT_CLIENT: deliver_publish, message_length_read=28, message_length=28
D (1234688) MQTT_CLIENT: Get data len= 3, topic len=21
(user code starts here with EVENT notification)
D (1234698) mqttdrv: MQTT_EVENT_DATA
D (1234698) mqttdrv: topic=std/dev98/r/0/gen/cmd, length: 21
D (1234708) mqttdrv: data=iii, length: 3