Aracılığıyla paylaş


EventProcessorClientOptions.PrefetchSizeInBytes Property

Definition

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.

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

Property Value

When set to null, the option is considered disabled; otherwise, it will be considered enabled and take precedence over any value specified for the PrefetchCountThe PrefetchSizeInBytes is an advanced control that developers can use to help tune performance in some scenarios; it is recommended to prefer using the PrefetchCount over this option where possible for more accurate control and more predictable throughput.

This size should be considered a statement of intent rather than a guaranteed limit; the local cache may be larger or smaller than the number of bytes specified, and will always contain at least one event when the PrefetchSizeInBytes is specified. A heuristic is used to predict the average event size to use for size calculations, which should be expected to fluctuate as traffic passes through the system. Consequently, the resulting resource use will fluctuate as well.

This option is disabled by default with the value set to null.

Exceptions

Occurs when the requested size is negative.

Applies to