Friday 6 August 2021

Event Grid and Event Hubs and Service Bus

Event Hub--Big Data Handling--Event Distribution (Discrete)--Telemetry Data


Eg: Application Insights, Logs


Event Grid---Reactive Programming--Event Streaming (Series)---Status Changes Reaction


Eg: Approval, Rejection


Service Bus--Enterprise Messaging---Messaging---Order Processing & Financial Transactions 


Differences between Event Grid and Event Hubs

The noticeable difference between them is that Event Hubs are accepting only endpoints for the ingestion of data and they don’t provide a mechanism for sending data back to publishers. On the other hand, Event Grid sends HTTP requests to notify events that happen in publishers.

Event Grid can trigger an Azure Function. In the case of Event Hubs, the Azure Function needs to pull and process an event.


Azure Service Bus


In simple terms we can compare this model with a IBM MQ i.e. a Queueing mechanism. Asynchronous flow of data which is based on FirstIn-FirstOut model. You sent a message to a queue and want this message to be processed within a specific amount of time. What if the messages is not processed either move it to dead letter queue or  perform some action to it. There is a temporary control and consistency over the data that is being processed.


EXAMPLE – Super market where the cashiers bills your item one by one


Azure Event Grid


If you have been working with Microsoft BizTalk Server, this concept is quite easy to relate to. Azure Event Grid is a Publisher/Subscriber model, where there is a publisher who sends a message and multiple party at the receiver ends receives these messages. This model is loosely coupled.


EXAMPLE – Supermarket buys similar product from multiple vendors. The place an order which is subscribed by multiple vendors. Each vendor receives a copy of the order.


Azure Event Hub

This is a messaging at scale mechanism where you process large volume of telemetry data. This cloud offering is a one-way event processing system that can take millions of events per second and can be used for analysis and storage. As compared with Queues message will not be removed from the Hub and can be read multiple times.


EXAMPLE : Super Market – All the details related to the purchase, sent to the event hub which can be used to analyse the stock in the inventory and alert the Inventory department whenever the product goes out of stock.

No comments:

Post a Comment