MQTT: SubTopic received, while receiving command echo

Hello,

I have the following problem:

  • I am subscribed to “subtopic/test” (which periodically sends "subtopic message")
    UART Receive Buffer: subtopic/test -> subtopic message\r\n

  • I periodically publish this message "HelloWorld!" (echo enabled)
    UART Receive Buffer: AT+MQTTPUB=\"HelloWorld!\"\r\n\r\n\r\nOK\r\n

  • Occasionally, i receive the subtopic, while receiving the echo or repsonse.
    UART Receive Buffer: AT+MQTTPUB=\"HelloWsubtopic/test -> subtopic message\r\norld!\"\r\n\r\n\r\nOK\r\n

Is this behaviour intentional? It makes parsing much more difficult!

Best regards,
srcnuzn

Hello.

Sorry for the late reply.

How about publishing a message if there is no received data(subscribe message) after reading the MCU’s buffer first?

Please refer to it.

Thanks.
Best regards.