aws / aws-iot-device-sdk-embedded-C

SDK for connecting to AWS IoT from a device using embedded C.
MIT License
978 stars 625 forks source link

Alternative to `aws_iot_mqtt_yield()` #1782

Closed MaazSk closed 2 years ago

MaazSk commented 2 years ago

I am using aws-iot-device-sdk with esp-idf. I am unable to receive messages to which I have subscribed. I read the documentation that I need to call aws_iot_mqtt_yield() function faster than the publish message. But I believe the aws subscribe functionality should work on event base or in callback fashion. So whenever I receive a message I should get an event or a callback. So is there any alternative to it.

archigup commented 2 years ago

Hi, if you would like a callback based API, you could use the newer coreMQTT library with the coreMQTT-Agent. The coreMQTT Agent provides an API that uses callbacks like you describe.

MaazSk commented 2 years ago

Okay,

I will give it a try and if I have any issue will let you know

Thank you!