Where is better use cases to use Azure Event Grid with MQTT in IoT system ?

ks 35 Reputation points
2023-06-05T08:17:11.58+00:00

I'd be glad if anyone could support me.
I'd like to know about Azure Event Grid with MQTT use cases.

In Microsoft Build 2023, Azure Event Grid supporting MQTT was announced, but I am not sure the main differences between the existing IoT Hub and this new feature.

IoT Hub also supports MQTT protocol and message routing into other Azure services like Event Hubs and Stream Analytics. I know that IoT Hub supports device management features while Event Grid does not.

However, in terms of messaging, I don't grasp situations we are happy to choose Event Grid with MQTT in IoT use cases.

For example, I'd like to know why this reference architecture adopted Eveng Grid as MQTT Broker instead of IoT Hub.

https://learn.microsoft.com/en-au/azure/event-grid/mqtt-automotive-connectivity-and-data-solution

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,271 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
454 questions
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 17,766 Reputation points Moderator
    2023-06-05T19:34:05.0533333+00:00

    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.

    1. 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.

    1. 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.

    1. 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.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.