I am subscribed to a certain topic. Periodically, I am publishing messages from device to mqtt broker. Sometimes, the incoming messages (for the topic we have subscribed) comes at the time of publishing message and overlaps with the response of Publish Message (something like this, +QMTPUBEX:). I have added flush function to clear out the response of publish but it also clears the incoming message. What are the best practices to manage this scenario?
Thanks