Hello @Domagoj Bazina ,
Just to ensure I understand right and clarify:
- Are you sending messages from the cloud to your devices? or
- Do you simulate a device with the Azure IoT Device SDK for Python to send messages from the Edge to the cloud?
For your cloud setup and message processing, you might consider using the built-in EventHub-compatible endpoint instead of an additional Azure Event Grid.
Be aware: Event Grid doesn't guarantee order for event delivery, so subscribers may receive them out of order, see here
IoT Hub takes care of providing the D2C messages in order on the built-in Endpoint by using the same partition for a specific device.
----------
If your question was solved, please do "accept answer" and feel free to upvote. If you need additional information, please provide more details.