Azure Service Bus Topic Vs Azure Event Grid Topic

During my first Azure Presentation on Azure Event Grid, there was an interesting question asked from someone in the Audience.

Question: Can you let us know what are the differences between the Azure Service Bus Topics and Azure Event Grid Topics ?

  • Azure Event Grid is a publish/subscribe model where all the events are pushed to the event handlers, while in case of Azure Service Bus Topic it keeps checking the topic subscription if there are any messages available. So in easy word Azure Event Grid is a push-model compare to Azure Service Bus topics which is a pull-model.
    • Azure Service Bus topic can use any of the following protocol to communicate  between machines – AMQP, TCP/IP, HTTP.
    • Azure Event Grid is based on HTTP protocol.
  • Since one uses Pull methodology and other uses Push methodology, with respect to Azure Service Bus topic subscriber which uses Pull mechanism and in charge of getting the messages and controlling the flow of messages. If you don’t pull the messages due to some reason the topic will get flooded with messages until the topic size is met. However in case of Azure Event Grid which is pushing the messages you do not have the control and your Event Handler should be capable enough to handle the load.
  • Azure Event Grid allows you to process 10 million events per second, per region which is way high compared to Azure Service Bus. You can check the Azure Service Bus quotas here – Link
  • If you see the Azure Service Bus quotas policy you will notice that it supports maximum message size: 256 KB (Standard tier) /1 MB (Premium tier). Anything beyond these quotas are rejected and exception is received by the calling code. While when pushing data to Event Grid topic, the size of an array can be up-to 1 Mb. Each event in an array is limited to 64 KB. Reference – Link

Any one of this can be used based on your need. I think when we looking at millions of event processing with larger throughput  and high velocity we must consider using Azure Event Grid in comparison with Azure Service Bus Topic.

One comment

Leave a reply to Microsoft Integration Weekly Update: May 21, 2018 | Hooking Stuffs Together Cancel reply