EventProcessorClient.ListOwnershipAsync(CancellationToken) Method


Produces a list of the ownership assignments for partitions between each of the cooperating event processor instances for a given Event Hub and consumer group pairing. This method is used when load balancing to allow the processor to discover other active collaborators and to make decisions about how to best balance work between them.

protected override System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Azure.Messaging.EventHubs.Primitives.EventProcessorPartitionOwnership>> ListOwnershipAsync (System.Threading.CancellationToken cancellationToken);
override this.ListOwnershipAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Azure.Messaging.EventHubs.Primitives.EventProcessorPartitionOwnership>>
Protected Overrides Function ListOwnershipAsync (cancellationToken As CancellationToken) As Task(Of IEnumerable(Of EventProcessorPartitionOwnership))



A CancellationToken instance to signal the request to cancel the processing. This is most likely to occur when the processor is shutting down.



The set of ownership records to take into account when making load balancing decisions.

Applies to