Hi @ks Greetings! Thank you for posting this question here.
The architecture referenced in the above article is meant to demonstrate one of the many possible usages of MQTT through Event Grid. I can see why it may lead to confusion as they article in referring to IoT sensors and not mention the usage of IoT Hub.
Here are few scenarios I can think of where you would want to consider using MQTT with Azure Event Grid.
- To implement event-driven architecture
Azure Event Grid is optimized for handling large volumes of events and can be used to route events to multiple endpoints based on events. The events in this case can be generated from wide range of sources such as SDKs or any applications and this need not be IoT sensor data.
- Multi-cloud scenarios
If you have IoT devices that need to send data to multiple cloud providers, you can use Azure Event Grid MQTT to route the data to the appropriate cloud provider based on event properties.
- Integration with third-party services
If you need to integrate with third-party services that do not support IoT Hub MQTT, you can use Azure Event Grid MQTT to route events to the appropriate endpoint. This can be useful in scenarios where you need to integrate with services such as Salesforce, Twilio etc.
You can certainly leverage IoT Hub routing and create Azure functions or a similar pipeline to achieve this. But this approach avoids the overhead.
Besides, IoT Hub MQTT is designed specifically for IoT scenarios. It offers additional features such as device management, message routing, and cloud-to-device communication. If your use case does not require any of the above IoT capabilities and just routing the data to an end point is basically what you are looking for, it makes sense to go with Azure Event Grid MQTT.
Hope this provides some additional clarification and help you gain clarity. Please let us know if you have any questions on this.
If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.