Dela via


PartitionReceiverOptions Class

Definition

The set of options that can be specified when creating a PartitionReceiver to configure its behavior.

public class PartitionReceiverOptions
type PartitionReceiverOptions = class
Public Class PartitionReceiverOptions
Inheritance
PartitionReceiverOptions

Constructors

PartitionReceiverOptions()

Properties

ConnectionOptions

The options used for configuring the connection to the Event Hubs service.

DefaultMaximumReceiveWaitTime

The default amount of time to wait for the requested amount of messages when reading; if this period elapses before the requested amount of messages were available or read, then the set of messages that were read will be returned.

Identifier

A unique name used to identify the receiver. If null or empty, a GUID will be used as the identifier.

OwnerLevel

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.

PrefetchCount

The number of events that will be eagerly requested from the Event Hubs service and queued locally without regard to whether a read operation is currently active, intended to help maximize throughput by allowing events to be read from from a local cache rather than waiting on a service request.

PrefetchSizeInBytes

The desired number of bytes to attempt to eagerly request from the Event Hubs service and queued locally without regard to whether a read operation is currently active, intended to help maximize throughput by allowing events to be read from from a local cache rather than waiting on a service request.

RetryOptions

The set of options to use for determining whether a failed operation should be retried and, if so, the amount of time to wait between retry attempts. These options also control the amount of time allowed for reading events and other interactions with the Event Hubs service.

TrackLastEnqueuedEventProperties

Indicates whether or not the reader should request information on the last enqueued event on the partition associated with a given event, and track that information as events are read.

Applies to