VSChina / ESP32_AzureIoT_Arduino

The library for ESP32 Azure IoT for Arduino
MIT License
37 stars 43 forks source link

how to subscribe the topic #25

Open yashram96 opened 3 years ago

yashram96 commented 3 years ago

as far i understand for publishing "Esp32MQTTClient_SendEventInstance()" function is used . But how to subscribe the topic . Please share the details .

pchevallier commented 3 years ago

The function: "EVENT_INSTANCE message = Esp32MQTTClient_Event_Generate(messagePayload, MESSAGE);" create the payload with all the json content in it that will be published to its Azure IoT Hub using the IoT device referenced in: static const char connectionString = "";

Once published, IoT Hub will direct the message to any services subscribed to it.