Skip to content
Advertisement

Can I use Azure Event Grid topics to communicate domain events in a microservice architecture?

I am confused. When comparing the messages services offered by Microsoft Azure, we can choose between:

  • Event Grid
  • Event Hubs
  • Service Bus
  • (Azure Cache for Redis)

This link gives the following comparison:

enter image description here

Now I’d like to write a microservice application consisting of several components. Each component should communicate local domain events to a topic (pub/sub). This could be achieved by using Service Bus topics, RabbitMQ topics, and so on.

Besides writing an Azure Function, I wasn’t able to find out if I can write an event handler in java, consuming events from an event grid topic (ideally in a spring-idiomatic way).

Is Azure Event Grid “only” for connecting Azure services together? Should I stick with Service Bus topics for such tasks? Thanks for clarifying.

Advertisement

Answer

The Azure Event Grid (AEG) is an eventing Pub/Sub model for reliable distributing an event interest to the destination resource in the PUSH manner, in other words, the AEG doesn’t require to host a listener/receiver to pull up the event message as it is required by Azure Service Bus and Azure Event Hubs.

More details about the event destination handlers can be found here. Note, that the webhook handler can be hosted anywhere.

In your scenario, the AEG enables to push the event messages to the destination resource such as an Azure Service Bus queue/topic and then handled like other ones.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement