Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] ESP-IDF - Subscribe and Yield

I am working on making a subscriber code to run on my ESP32. I am able to connect to my broker and I am able to subscribe as well but I am unable to receive the messages that are being sent to the Device and as a result the broker keeps sending messages to the device. Even when I receive the message, the ACK is not being sent back. 

This is link to the code Client API that I am using but there is not proper documentation to help me out.

ESP_LOGI(MQTT_TAG, "MQTTUnsubscribe  ...");
ret = MQTTUnsubscribe(&client, "test/topic");
if (ret != SUCCESS) {
ESP_LOGI(MQTT_TAG, "MQTTUnsubscribe: %d", ret);

This is the code to subscribe.

while(1) {
ret = MQTTYield(&client, 1000);
if (ret != SUCCESS) {
ESP_LOGI(MQTT_TAG, "MQTTYield: %d", ret);

And this is the code to keep the client connection alive.

It would be great if someone could help me out 
I also posted an issue on Github at the link
If someone knows something you can help me out on the link above. 
Thank You.

Back to the top