Skip to content

Commit a5cad46

Browse files
authored
Merge pull request #190046 from spelluru/ehubqsnet0228
updated image and added links to API content
2 parents e9d838d + a016200 commit a5cad46

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

articles/event-hubs/event-hubs-about.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: What is Azure Event Hubs? - a Big Data ingestion service | Microsoft Docs
33
description: Learn about Azure Event Hubs, a Big Data streaming service that ingests millions of events per second.
44
ms.topic: overview
5-
ms.date: 05/25/2021
5+
ms.date: 02/28/2022
6+
ms.custom: contperf-fy22q3
67
---
78

89
# Azure Event Hubs — A big data streaming platform and event ingestion service
@@ -13,7 +14,7 @@ The following scenarios are some of the scenarios where you can use Event Hubs:
1314
- Anomaly detection (fraud/outliers)
1415
- Application logging
1516
- Analytics pipelines, such as clickstreams
16-
- Live dashboarding
17+
- Live dashboards
1718
- Archiving data
1819
- Transaction processing
1920
- User telemetry processing
@@ -47,7 +48,7 @@ With a broad ecosystem based on the industry-standard AMQP 1.0 protocol and avai
4748
[Event Hubs for Apache Kafka ecosystems](event-hubs-for-kafka-ecosystem-overview.md) furthermore enables [Apache Kafka (1.0 and later)](https://kafka.apache.org/) clients and applications to talk to Event Hubs. You don't need to set up, configure, and manage your own Kafka and Zookeeper clusters or use some Kafka-as-a-Service offering not native to Azure.
4849

4950
## Event Hubs premium and dedicated
50-
Event Hubs **premium** caters to high-end streaming needs that require superior performance, better isolation with predictable latency and minimal interference in a managed multitenant PaaS environment. On top of all the features of the standard offering, the premium tier offers several extra features such as dynamic partition scale up, extended retention, and customer-managed-keys. For more information, see [Event Hubs Premium](event-hubs-premium-overview.md).
51+
Event Hubs **premium** caters to high-end streaming needs that require superior performance, better isolation with predictable latency and minimal interference in a managed multitenant PaaS environment. On top of all the features of the standard offering, the premium tier offers several extra features such as [dynamic partition scale up](dynamically-add-partitions.md), extended retention, and [customer-managed-keys](configure-customer-managed-key.md). For more information, see [Event Hubs Premium](event-hubs-premium-overview.md).
5152

5253
Event Hubs **dedicated** tier offers single-tenant deployments for customers with the most demanding streaming needs. This single-tenant offering has a guaranteed 99.99% SLA and is available only on our dedicated pricing tier. An Event Hubs cluster can ingress millions of events per second with guaranteed capacity and subsecond latency. Namespaces and event hubs created within the dedicated cluster include all features of the premium offering and more. For more information, see [Event Hubs Dedicated](event-hubs-dedicated-overview.md).
5354

@@ -58,15 +59,15 @@ Event Hubs on Azure Stack Hub allows you to realize hybrid cloud scenarios. Stre
5859

5960
The Event Hubs editions (on Azure Stack Hub and on Azure) offer a high degree of feature parity. This parity means SDKs, samples, PowerShell, CLI, and portals offer a similar experience, with few differences.
6061

61-
Event Hubs on Stack is free during public preview. For more information, see [Event Hubs on Azure Stack Hub overview](/azure-stack/user/event-hubs-overview).
62+
For more information, see [Event Hubs on Azure Stack Hub overview](/azure-stack/user/event-hubs-overview).
6263

6364
## Key architecture components
6465
Event Hubs contains the following [key components](event-hubs-features.md):
6566

6667
- **Event producers**: Any entity that sends data to an event hub. Event publishers can publish events using HTTPS or AMQP 1.0 or Apache Kafka (1.0 and above)
6768
- **Partitions**: Each consumer only reads a specific subset, or partition, of the message stream.
6869
- **Consumer groups**: A view (state, position, or offset) of an entire event hub. Consumer groups enable consuming applications to each have a separate view of the event stream. They read the stream independently at their own pace and with their own offsets.
69-
- [Throughput units](event-hubs-scalability.md#throughput-units) or [processing units](event-hubs-scalability.md#processing-units): Pre-purchased units of capacity that control the throughput capacity of Event Hubs.
70+
- [Throughput units (standard tier)](event-hubs-scalability.md#throughput-units) or [processing units (premium tier)](event-hubs-scalability.md#processing-units) or [capacity units (dedicated)](event-hubs-dedicated-overview.md) : Pre-purchased units of capacity that control the throughput capacity of Event Hubs.
7071
- **Event receivers**: Any entity that reads event data from an event hub. All Event Hubs consumers connect via the AMQP 1.0 session. The Event Hubs service delivers events through a session as they become available. All Kafka consumers connect via the Kafka protocol 1.0 and later.
7172

7273
The following figure shows the Event Hubs stream processing architecture:

articles/event-hubs/event-hubs-dotnet-standard-getstarted-send.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: Send or receive events from Azure Event Hubs using .NET (latest)
33
description: This article provides a walkthrough to create a .NET Core application that sends/receives events to/from Azure Event Hubs by using the latest Azure.Messaging.EventHubs package.
44
ms.topic: quickstart
5-
ms.date: 06/10/2021
5+
ms.date: 02/28/2022
66
ms.devlang: csharp
7-
ms.custom: devx-track-csharp, mode-api
7+
ms.custom: devx-track-csharp, mode-api, contperf-fy22q3
88
---
99

1010
# Send events to and receive events from Azure Event Hubs - .NET (Azure.Messaging.EventHubs)
@@ -16,7 +16,7 @@ If you're new to Azure Event Hubs, see [Event Hubs overview](event-hubs-about.md
1616
To complete this quickstart, you need the following prerequisites:
1717

1818
- **Microsoft Azure subscription**. To use Azure services, including Azure Event Hubs, you need a subscription. If you don't have an existing Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/) or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com).
19-
- **Microsoft Visual Studio 2019**. The Azure Event Hubs client library makes use of new features that were introduced in C# 8.0. You can still use the library with previous C# language versions, but the new syntax won't be available. To make use of the full syntax, it is recommended that you compile with the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher and [language version](/dotnet/csharp/language-reference/configure-language-version#override-a-default) set to `latest`. If you're using Visual Studio, versions before Visual Studio 2019 aren't compatible with the tools needed to build C# 8.0 projects. Visual Studio 2019, including the free Community edition, can be downloaded [here](https://visualstudio.microsoft.com/vs/).
19+
- **Microsoft Visual Studio 2019**. The Azure Event Hubs client library makes use of new features that were introduced in C# 8.0. You can still use the library with previous C# language versions, but the new syntax won't be available. To make use of the full syntax, we recommend that you compile with the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher and [language version](/dotnet/csharp/language-reference/configure-language-version#override-a-default) set to `latest`. If you're using Visual Studio, versions before Visual Studio 2019 aren't compatible with the tools needed to build C# 8.0 projects. Visual Studio 2019, including the free Community edition, can be downloaded [here](https://visualstudio.microsoft.com/vs/).
2020
- **Create an Event Hubs namespace and an event hub**. The first step is to use the [Azure portal](https://portal.azure.com) to create a namespace of type Event Hubs, and obtain the management credentials your application needs to communicate with the event hub. To create a namespace and an event hub, follow the procedure in [this article](event-hubs-create.md). Then, get the **connection string for the Event Hubs namespace** by following instructions from the article: [Get connection string](event-hubs-get-connection-string.md#azure-portal). You use the connection string later in this quickstart.
2121

2222
## Send events
@@ -81,8 +81,13 @@ This section shows you how to create a .NET Core console application to send eve
8181
// of the application, which is best practice when events are being published or read regularly.
8282
static EventHubProducerClient producerClient;
8383
```
84-
1. Replace the `Main` method with the following `async Main` method. See the code comments for details.
84+
1. Replace the `Main` method with the following `async Main` method. See the code comments for details. Here are the important steps from the code.
8585
86+
1. Creates a [EventHubProducerClient](/dotnet/api/azure.messaging.eventhubs.producer.eventhubproducerclient) object using the primary connection string to the namespace and the event hub name.
87+
1. Invokes the [CreateBatchAsync](/dotnet/api/azure.messaging.eventhubs.producer.eventhubproducerclient.createbatchasync) method on the [EventHubProducerClient](/dotnet/api/azure.messaging.eventhubs.producer.eventhubproducerclient) object to create a [EventDataBatch](/dotnet/api/azure.messaging.eventhubs.producer.eventdatabatch) object.
88+
1. Add events to the batch using the [EventDataBatch.TryAdd](/dotnet/api/azure.messaging.eventhubs.producer.eventdatabatch.tryadd) method.
89+
1. Sends the batch of messages to the event hub using the [EventHubProducerClient.SendAsync](/dotnet/api/azure.messaging.eventhubs.producer.eventhubproducerclient.sendasync) method.
90+
8691
```csharp
8792
static async Task Main()
8893
{
@@ -198,7 +203,12 @@ In this quickstart, you use Azure Storage as the checkpoint store. Follow these
198203
// of the application, which is best practice when events are being published or read regularly.
199204
static EventProcessorClient processor;
200205
```
201-
1. Replace the `Main` method with the following `async Main` method. See the code comments for details.
206+
1. Replace the `Main` method with the following `async Main` method. See the code comments for details. Here are the important steps from the code.
207+
208+
1. Creates an [EventProcessorClient](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient) object using the primary connection string to the namespace and the event hub. You need to build [BlobContainerClient](/dotnet/api/azure.storage.blobs.blobcontainerclient) object for the container in the Azure storage you created earlier.
209+
1. Specifies handlers for the [ProcessEventAsync](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.processeventasync) and [ProcessErrorAsync](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.processerrorasync) events of the [EventProcessorClient](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient) object.
210+
1. Starts processing events by invoking the [StartProcessingAsync](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.startprocessingasync) on the [EventProcessorClient](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient) object.
211+
1. When user presses a key to end the processing, invokes the [StopProcessingAsync](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.stopprocessingasync) on the [EventProcessorClient](/dotnet/api/azure.messaging.eventhubs.eventprocessorclient) object.
202212
203213
```csharp
204214
static async Task Main()
@@ -259,10 +269,13 @@ In this quickstart, you use Azure Storage as the checkpoint store. Follow these
259269
Received event: Event 3
260270
```
261271
These events are the three events you sent to the event hub earlier by running the sender program.
272+
1. In the Azure portal, you can verify that there are 3 outgoing messages. These are the messages Event Hubs sent to the receiving application. Refresh the page to update the chart. It may take a few seconds for it to show that the messages have been received.
273+
274+
:::image type="content" source="./media/getstarted-dotnet-standard-send-v2/verify-messages-portal-2.png" alt-text="Image of the Azure portal page to verify that the event hub sent events to the receiving app" lightbox="./media/getstarted-dotnet-standard-send-v2/verify-messages-portal-2.png":::
262275
263276
264277
## Next steps
265-
Check out the samples on GitHub.
278+
This quick start provides step-by-step instructions to implement a simple scenario of sending a batch of events to an event hub and then receiving them. For more samples on other and advanced scenarios, check out the following samples on GitHub.
266279
267280
- [Event Hubs samples on GitHub](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/eventhub/Azure.Messaging.EventHubs/samples)
268281
- [Event processor samples on GitHub](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples)
85.4 KB
Loading
-39.4 KB
Loading

0 commit comments

Comments
 (0)