Sdílet prostřednictvím


EventHubProducerClient.GetPartitionIdsAsync(CancellationToken) Method

Definition

Retrieves the set of identifiers for the partitions of an Event Hub.

public virtual System.Threading.Tasks.Task<string[]> GetPartitionIdsAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetPartitionIdsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<string[]>
override this.GetPartitionIdsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<string[]>
Public Overridable Function GetPartitionIdsAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of String())

Parameters

cancellationToken
CancellationToken

An optional CancellationToken instance to signal the request to cancel the operation.

Returns

The set of identifiers for the partitions within the Event Hub that this client is associated with.

Remarks

This method is synonymous with invoking GetEventHubPropertiesAsync(CancellationToken) and reading the PartitionIds property that is returned. It is offered as a convenience for quick access to the set of partition identifiers for the associated Event Hub. No new or extended information is presented.

Applies to