How to publish an MQTT message in Event grid after the reception of a message in Event Hub ?

Omar Cruz 21 Reputation points
2024-07-15T13:02:10.5533333+00:00

Hello.
My devices report the data by MQTT, messages easily received in event grid.

Event grid passes the messages to Event Hub.

Event hub passes the messages where there are treated, filtered, etc.

The response is sent back to Event Hub.

From Event Hub these messages received should now be passed to Event Grid (so they can be published as MQTT messages) and this is where I am not very sure how to proceeed. Would you have any ideas? I have checked all the documentation but still I don't find my way...

Thanks in advance for any assistance.

Omar C.

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
644 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
390 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 32,736 Reputation points MVP
    2024-07-15T15:21:34.2+00:00

    Hello @Omar Cruz,

    welcome to this moderated Azure community forum.

    You make use of routing MQTT messages towards an Eventhub:

    Diagram of the MQTT message routing.

    This is a one-way connection, from MQTT broker towards Azure services.

    If you need to send message on certain topics, you need to create a separate MQTT client for sending these messages.

    Because you need to create a client connection before sending messages, a stateful client is recommended so the connection is kept alive.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


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.