Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

EventHubConsumerGroup.RegisterProcessorAsync 方法

定义

重载

RegisterProcessorAsync<T>(Lease, ICheckpointManager)

RegisterProcessor<T>(Lease, ICheckpointManager) 的异步版本。

RegisterProcessorAsync<T>(Lease, ICheckpointManager, EventProcessorOptions)

RegisterProcessor<T>(Lease, ICheckpointManager, EventProcessorOptions) 的异步版本。

RegisterProcessorAsync<T>(Lease, ICheckpointManager)

public System.Threading.Tasks.Task RegisterProcessorAsync<T> (Microsoft.ServiceBus.Messaging.Lease lease, Microsoft.ServiceBus.Messaging.ICheckpointManager checkpointManager) where T : Microsoft.ServiceBus.Messaging.IEventProcessor;
member this.RegisterProcessorAsync : Microsoft.ServiceBus.Messaging.Lease * Microsoft.ServiceBus.Messaging.ICheckpointManager -> System.Threading.Tasks.Task (requires 'T :> Microsoft.ServiceBus.Messaging.IEventProcessor)
Public Function RegisterProcessorAsync(Of T As IEventProcessor) (lease As Lease, checkpointManager As ICheckpointManager) As Task

类型参数

T

IEventProcessor 的实现。

参数

lease
Lease

分区信息。

checkpointManager
ICheckpointManager

在调用 时 CheckpointAsync(EventData) 检查指定分区的偏移量。

返回

表示异步操作的任务实例。

适用于

RegisterProcessorAsync<T>(Lease, ICheckpointManager, EventProcessorOptions)

public System.Threading.Tasks.Task RegisterProcessorAsync<T> (Microsoft.ServiceBus.Messaging.Lease lease, Microsoft.ServiceBus.Messaging.ICheckpointManager checkpointManager, Microsoft.ServiceBus.Messaging.EventProcessorOptions processorOptions) where T : Microsoft.ServiceBus.Messaging.IEventProcessor;
member this.RegisterProcessorAsync : Microsoft.ServiceBus.Messaging.Lease * Microsoft.ServiceBus.Messaging.ICheckpointManager * Microsoft.ServiceBus.Messaging.EventProcessorOptions -> System.Threading.Tasks.Task (requires 'T :> Microsoft.ServiceBus.Messaging.IEventProcessor)
Public Function RegisterProcessorAsync(Of T As IEventProcessor) (lease As Lease, checkpointManager As ICheckpointManager, processorOptions As EventProcessorOptions) As Task

类型参数

T

IEventProcessor 的实现。

参数

lease
Lease

分区信息。

checkpointManager
ICheckpointManager

在调用 时 CheckpointAsync(EventData) 检查指定分区的偏移量。

processorOptions
EventProcessorOptions

一个 EventProcessorOptions 对象。

返回

返回 Task

注解

若要执行更高级 IEventProcessor 的创建,请实现一个 IEventProcessorFactory 类,该类允许你控制事件处理器的创建方式。

适用于