// Read from the default consumer group: $Default
string consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName;
// Create a blob container client that the event processor will use
storageClient = new BlobContainerClient(blobStorageConnectionString, blobContainerName);
// Create an event processor client to process events in the event hub
processor = new EventProcessorClient(storageClient, consumerGroup, ehubNamespaceConnectionString, eventHubName);
// Register handlers for processing events and handling errors
processor.ProcessEventAsync += ProcessEventHandler;
processor.ProcessErrorAsync += ProcessErrorHandler;
// Start the processing
await processor.StartProcessingAsync();
2条答案
按热度按时间ebdffaop1#
您需要使用.Net创建一个接收器,
下面是一个关于文档的示例。
szqfcxe22#
您可以在eventhub上启用“捕获”,并将流处理的事件保存到您选择的存储帐户。请查看下面的详细信息。
https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-capture-overview