Skip to content

Commit 0408158

Browse files
authored
Merge pull request #236044 from spelluru/compare-messaging
Compare messaging services
2 parents 42ddadf + 92d29d3 commit 0408158

File tree

5 files changed

+1095
-1
lines changed

5 files changed

+1095
-1
lines changed

articles/event-grid/.openpublishing.redirection.event-grid.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"redirections": [
33
{
44
"source_path": "compare-messaging-services.md",
5-
"redirect_url": "/azure/architecture/guide/technology-choices/messaging",
5+
"redirect_url": "/azure/service-bus-messaging/compare-messaging-services",
66
"redirect_document_id": false
77
},
88
{

articles/event-hubs/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
href: schema-registry-overview.md
1111
- name: Terminology
1212
href: event-hubs-features.md
13+
- name: Compare messaging services
14+
href: ../service-bus-messaging/compare-messaging-services.md
1315
- name: Quickstarts
1416
expanded: true
1517
items:

articles/service-bus-messaging/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
href: service-bus-messaging-overview.md
77
- name: Use Service Bus with Java Message Service (JMS) 2.0
88
href: how-to-use-java-message-service-20.md
9+
- name: Compare messaging services
10+
href: compare-messaging-services.md
911
- name: Quickstarts
1012
items:
1113
- name: Service Bus queues
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Compare Azure messaging services
3+
description: Describes the three Azure messaging services - Azure Event Grid, Event Hubs, and Service Bus. Recommends which service to use for different scenarios.
4+
ms.topic: overview
5+
ms.date: 11/01/2022
6+
---
7+
8+
# Choose between Azure messaging services - Event Grid, Event Hubs, and Service Bus
9+
10+
Azure offers three services that assist with delivering events or messages throughout a solution. These services are:
11+
12+
- Azure Event Grid
13+
- Azure Event Hubs
14+
- Azure Service Bus
15+
16+
Although they have some similarities, each service is designed for particular scenarios. This article describes the differences between these services, and helps you understand which one to choose for your application. In many cases, the messaging services are complementary and can be used together.
17+
18+
## Event vs. message services
19+
There's an important distinction between services that deliver an event and services that deliver a message.
20+
21+
### Event
22+
An event is a lightweight notification of a condition or a state change. The publisher of the event has no expectation about how the event is handled. The consumer of the event decides what to do with the notification. Events can be discrete units or part of a series.
23+
24+
Discrete events report state change and are actionable. To take the next step, the consumer only needs to know that something happened. The event data has information about what happened but doesn't have the data that triggered the event. For example, an event notifies consumers that a file was created. It may have general information about the file, but it doesn't have the file itself. Discrete events are ideal for serverless solutions that need to scale.
25+
26+
A series of events reports a condition and are analyzable. The events are time-ordered and interrelated. The consumer needs the sequenced series of events to analyze what happened.
27+
28+
### Message
29+
A message is raw data produced by a service to be consumed or stored elsewhere. The message contains the data that triggered the message pipeline. The publisher of the message has an expectation about how the consumer handles the message. A contract exists between the two sides. For example, the publisher sends a message with the raw data, and expects the consumer to create a file from that data and send a response when the work is done.
30+
31+
32+
## Azure Event Grid
33+
Event Grid is an eventing backplane that enables event-driven, reactive programming. It uses the publish-subscribe model. Publishers emit events, but have no expectation about how the events are handled. Subscribers decide on which events they want to handle.
34+
35+
Event Grid is deeply integrated with Azure services and can be integrated with third-party services. It simplifies event consumption and lowers costs by eliminating the need for constant polling. Event Grid efficiently and reliably routes events from Azure and non-Azure resources. It distributes the events to registered subscriber endpoints. The event message has the information you need to react to changes in services and applications. Event Grid isn't a data pipeline, and doesn't deliver the actual object that was updated.
36+
37+
It has the following characteristics:
38+
39+
- Dynamically scalable
40+
- Low cost
41+
- Serverless
42+
- At least once delivery of an event
43+
44+
Event Grid is offered in two editions: **Azure Event Grid**, a fully managed PaaS service on Azure, and **Event Grid on Kubernetes with Azure Arc**, which lets you use Event Grid on your Kubernetes cluster wherever that is deployed, on-premises or on the cloud. For more information, see [Azure Event Grid overview](../event-grid/overview.md) and [Event Grid on Kubernetes with Azure Arc overview](../event-grid/kubernetes/overview.md).
45+
46+
## Azure Event Hubs
47+
Azure Event Hubs is a big data streaming platform and event ingestion service. It can receive and process millions of events per second. It facilitates the capture, retention, and replay of telemetry and event stream data. The data can come from many concurrent sources. Event Hubs allows telemetry and event data to be made available to various stream-processing infrastructures and analytics services. It's available either as data streams or bundled event batches. This service provides a single solution that enables rapid data retrieval for real-time processing, and repeated replay of stored raw data. It can capture the streaming data into a file for processing and analysis.
48+
49+
It has the following characteristics:
50+
51+
- Low latency
52+
- Can receive and process millions of events per second
53+
- At least once delivery of an event
54+
55+
For more information, see [Event Hubs overview](../event-hubs/event-hubs-about.md).
56+
57+
## Azure Service Bus
58+
Service Bus is a fully managed enterprise message broker with message queues and publish-subscribe topics. The service is intended for enterprise applications that require transactions, ordering, duplicate detection, and instantaneous consistency. Service Bus enables cloud-native applications to provide reliable state transition management for business processes. When handling high-value messages that can't be lost or duplicated, use Azure Service Bus. This service also facilitates highly secure communication across hybrid cloud solutions and can connect existing on-premises systems to cloud solutions.
59+
60+
Service Bus is a brokered messaging system. It stores messages in a "broker" (for example, a queue) until the consuming party is ready to receive the messages. It has the following characteristics:
61+
62+
- Reliable asynchronous message delivery (enterprise messaging as a service) that requires polling
63+
- Advanced messaging features like first-in and first-out (FIFO), batching/sessions, transactions, dead-lettering, temporal control, routing and filtering, and duplicate detection
64+
- At least once delivery of a message
65+
- Optional ordered delivery of messages
66+
67+
For more information, see [Service Bus overview](../service-bus-messaging/service-bus-messaging-overview.md).
68+
69+
## Comparison of services
70+
71+
| Service | Purpose | Type | When to use |
72+
| ------- | ------- | ---- | ----------- |
73+
| Event Grid | Reactive programming | Event distribution (discrete) | React to status changes |
74+
| Event Hubs | Big data pipeline | Event streaming (series) | Telemetry and distributed data streaming |
75+
| Service Bus | High-value enterprise messaging | Message | Order processing and financial transactions |
76+
77+
## Use the services together
78+
In some cases, you use the services side by side to fulfill distinct roles. For example, an e-commerce site can use Service Bus to process the order, Event Hubs to capture site telemetry, and Event Grid to respond to events like an item was shipped.
79+
80+
In other cases, you link them together to form an event and data pipeline. You use Event Grid to respond to events in the other services. For an example of using Event Grid with Event Hubs to migrate data to Azure Synapse Analytics, see [Stream big data into a Azure Synapse Analytics](../event-grid/event-hubs-integration.md). The following image shows the workflow for streaming the data.
81+
82+
:::image type="content" source="./media/compare-messaging-services/overview.svg" alt-text="Diagram showing how Event Hubs, Service Bus, and Event Grid can be connected together.":::
83+
84+
## Next steps
85+
See the following articles:
86+
- [Asynchronous messaging options in Azure](/azure/architecture/guide/technology-choices/messaging)
87+
- [Events, Data Points, and Messages - Choosing the right Azure messaging service for your data](https://azure.microsoft.com/blog/events-data-points-and-messages-choosing-the-right-azure-messaging-service-for-your-data/).
88+

0 commit comments

Comments
 (0)