You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [Event Hubs] Improve Processor Documentation
The focus of these changes is to clarify that the Azure Storage container
used with the processor must exist and will not be implicitly created.
Copy file name to clipboardExpand all lines: sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Thank you to our developer community members who helped to make the Event Hubs c
18
18
19
19
- Remove allocations from Event Source logging by introducing `WriteEvent` overloads to handle cases that would otherwise result in boxing to `object[]` via params array. _(A community contribution, courtesy of [danielmarbach](https://github.com/danielmarbach))_
20
20
21
+
- Enhanced README documentation to call attention to the need for the Azure Storage container used with the processor to exist, and highlight that it will not be implicitly created.
Copy file name to clipboardExpand all lines: sdk/eventhub/Azure.Messaging.EventHubs.Processor/README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,9 @@ The Event Processor client library is a companion to the Azure Event Hubs client
20
20
21
21
-**Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.
22
22
23
-
-**Azure Storage account with blob storage:** To persist checkpoints as blobs in Azure Storage, you'll need to have an Azure Storage account with blobs available. If you are not familiar with Azure Storage accounts, you may wish to follow the step-by-step guide for [creating a storage account using the Azure portal](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create storage accounts.
23
+
-**Azure Storage account with blob storage:** To persist checkpoints and govern ownership in Azure Storage, you'll need to have an Azure Storage account with blobs available. If you are not familiar with Azure Storage accounts, you may wish to follow the step-by-step guide for [creating a storage account using the Azure portal](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create storage accounts.
24
+
25
+
-**Azure Storage blob container:** Checkpoint and ownership data in Azure Storage will be written to blobs in a specific container. The `EventProcessorClient` requires an existing container and will not implicitly create one to help guard against accidental misconfiguration. If you are not familiar with Azure Storage containers, you may wish to refer to the documentation on [managing containers](https://docs.microsoft.com/azure/storage/blobs/storage-blob-container-create?tabs=dotnet). There, you can find detailed instructions for using .NET, the Azure CLI, or Azure PowerShell to create a container.
24
26
25
27
-**C# 8.0:** The Azure Event Hubs client library makes use of new features that were introduced in C# 8.0. In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`.
26
28
@@ -85,9 +87,14 @@ We guarantee that all client instance methods are thread-safe and independent of
85
87
86
88
### Creating an Event Processor client
87
89
88
-
Since the `EventProcessorClient` has a dependency on Azure Storage blobs for persistence of its state, you'll need to provide a `BlobContainerClient` for the processor, which has been configured for the storage account and container that should be used.
90
+
Since the `EventProcessorClient` has a dependency on Azure Storage blobs for persistence of its state, you'll need to provide a `BlobContainerClient` for the processor, which has been configured for the storage account and container that should be used. The container used to configure the `EventProcessorClient` must exist.
91
+
92
+
Because the `EventProcessorClient` has no way of knowing the intent of specifying a container that does not exist, it will not implicitly create the container. This acts as a guard against a misconfigured container causing a rogue processor unable to share ownership and interfering with other processors in the consumer group.
89
93
90
94
```C# Snippet:EventHubs_Processor_ReadMe_Create
95
+
// The container specified when creating the BlobContainerClient must exist; it will
96
+
// not be implicitly created.
97
+
91
98
varstorageConnectionString="<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>";
92
99
varblobContainerName="<< NAME OF THE BLOB CONTAINER >>";
93
100
@@ -96,14 +103,7 @@ var eventHubName = "<< NAME OF THE EVENT HUB >>";
96
103
varconsumerGroup="<< NAME OF THE EVENT HUB CONSUMER GROUP >>";
0 commit comments