EventProcessorClient.OnInitializingPartitionAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs the tasks to initialize a partition, and its associated context, for event processing.
protected override System.Threading.Tasks.Task OnInitializingPartitionAsync (Azure.Messaging.EventHubs.Primitives.EventProcessorPartition partition, System.Threading.CancellationToken cancellationToken);
override this.OnInitializingPartitionAsync : Azure.Messaging.EventHubs.Primitives.EventProcessorPartition * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overrides Function OnInitializingPartitionAsync (partition As EventProcessorPartition, cancellationToken As CancellationToken) As Task
Parameters
- partition
- EventProcessorPartition
The context of the partition being initialized. Only the well-known members of the EventProcessorPartition will be populated. If a custom context is being used, the implementor of this method is responsible for initializing custom members.
- cancellationToken
- CancellationToken
A CancellationToken instance to signal the request to cancel the initialization. This is most likely to occur if the partition is claimed by another event processor instance or the processor is shutting down.
Returns
Remarks
It is not recommended that the state of the processor be managed directly from within this method; requesting to start or stop the processor may result in a deadlock scenario, especially if using the synchronous form of the call.
Applies to
Azure SDK for .NET