Share via


PartitionReceiverOptions.PrefetchCount Property

Definition

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.

public int PrefetchCount { get; set; }
member this.PrefetchCount : int with get, set
Public Property PrefetchCount As Integer

Property Value

The PrefetchCount is a control that developers can use to help tune performance for the specific needs of an application, given its expected size of events, throughput needs, and expected scenarios for using Event Hubs.

The default prefetch count is 300.

Exceptions

Occurs when the requested count is negative.

Applies to