다음을 통해 공유


ReadEventOptions.OwnerLevel Property

Definition

When populated, the owner level indicates that a reading is intended to be performed exclusively for events in the requested partition and for the associated consumer group. To do so, reading will attempt to assert ownership over the partition; in the case where more than one exclusive reader in the consumer group attempts to assert ownership for the same partition, the one having a larger OwnerLevel value will "win".

When an exclusive reader is used, other readers which are non-exclusive or which have a lower owner level will either not be allowed to be created, if they already exist, will encounter an exception during the next attempted operation.

public long? OwnerLevel { get; set; }
member this.OwnerLevel : Nullable<int64> with get, set
Public Property OwnerLevel As Nullable(Of Long)

Property Value

The relative priority to associate with an exclusive reader; for a non-exclusive reader, this value should be null.

Exceptions

Occurs when the owner level is set and the EventHubConsumerClient is unable to read from the requested Event Hub partition due to being denied ownership. In this case, the EventHubsException.FailureReason will be set to ConsumerDisconnected.

Remarks

An EventHubsException will occur if an EventHubConsumerClient is unable to read events from the requested Event Hub partition for the given consumer group. In this case, the EventHubsException.FailureReason will be set to ConsumerDisconnected.

Applies to

See also