PartitionReceiverOptions.OwnerLevel Property
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.
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 attempts to assert ownership for the same partition/consumer group pair, 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
. The
default owner level is null
.
Exceptions
Occurs when the owner level is set and the PartitionReceiver 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 a PartitionReceiver 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
Azure SDK for .NET