MQTT strange behaviour

User avatar
redradist
Posts: 18
Joined: Sat Apr 11, 2020 8:33 am

MQTT strange behaviour

Postby redradist » Sat Nov 21, 2020 10:11 pm

Hi all,

I have started working with MQTT on ESP32 and faced with strange issue that when I first time receive some topic data than I always receive this topic again and again:

D (1042228) MQTT_CLIENT: mqtt_message_receive: first byte: 0x40
D (1042233) MQTT_CLIENT: mqtt_message_receive: read "remaining length" byte: 0x2
D (1042239) MQTT_CLIENT: mqtt_message_receive: total message length: 4 (already read: 2)
D (1042248) MQTT_CLIENT: mqtt_message_receive: read_len=2
D (1042253) MQTT_CLIENT: mqtt_message_receive: transport_read():4 4
D (1042259) MQTT_CLIENT: msg_type=4, msg_id=26549
D (1042264) MQTT_CLIENT: pending_id=26549, pending_msg_count = 1
D (1042270) OUTBOX: DELETED msgid=26549, msg_type=3, remain size=0
D (1042276) MQTT_CLIENT: received MQTT_MSG_TYPE_PUBACK, finish QoS1 publish
D (1042284) event: running post MQTT_EVENTS:5 with handler 0x400df8a8 and context 0x3ffe319c on loop 0x3ffe27c4

It is very strange ... Maybe I should respond somehow that I've received this message ???

User avatar
redradist
Posts: 18
Joined: Sat Apr 11, 2020 8:33 am

Re: MQTT strange behaviour

Postby redradist » Sat Nov 21, 2020 11:06 pm

I have figured out, it is not an issue, it is PUBACK for my own message the reason that I thought it is an issue, because seems like PUBACK received with wrong topic string, actually it is latest set command to device, but topic should be for my own message ... I am not sure yet is it issue on esp-idf or on MQTT broker side ...

Who is online

Users browsing this forum: Google [Bot], Jakobsen and 28 guests