EventProcessorOptions EventProcessorOptions EventProcessorOptions Class


Defines the runtime options when registering an IEventProcessor interface with an EventHubConsumerGroup. This is also the mechanism for catching exceptions from an IEventProcessor instance used by an EventProcessorHost object.

public class EventProcessorOptions
type EventProcessorOptions = class
Public Class EventProcessorOptions


EventProcessorOptions() EventProcessorOptions() EventProcessorOptions()


DefaultOptions DefaultOptions DefaultOptions

Gets the default options, which is 10 for the MaxBatchSize, and 1 minute for the ReceiveTimeOut property.

EnableReceiverRuntimeMetric EnableReceiverRuntimeMetric EnableReceiverRuntimeMetric

Gets or sets a value indicating whether the runtime metric of a receiver is enabled.

InitialOffsetProvider InitialOffsetProvider InitialOffsetProvider

Gets or sets a delegate which is used to get the initial offset for a given partition to create EventHubReceiver. Delegate is invoked by passing in PartitionId and then user can return either the starting offset as string or starting UTC time for receiving messages. This is only used when Offset is not provided and receiver is being created for the very first time. This corresponds to either CreateReceiverAsync(String, ReceiverOptions) or CreateReceiverAsync(String, DateTime, ReceiverOptions) depending on the type of return value from delegate.

InvokeProcessorAfterReceiveTimeout InvokeProcessorAfterReceiveTimeout InvokeProcessorAfterReceiveTimeout

Enabling this option will cause ProcessEventsAsync(PartitionContext, IEnumerable<EventData>) to be invoked after every ReceiveTimeout when there are no more messages in the stream for a partition.

MaxBatchSize MaxBatchSize MaxBatchSize

Gets or sets the maximum event count that a user is willing to accept for processing per receive loop. This count is on a per-Event Hub partition level.

PrefetchCount PrefetchCount PrefetchCount

Gets or sets the number of events that any receiver in the currently owned partition will actively cache. The default value for this property is 300.

ReceiveTimeOut ReceiveTimeOut ReceiveTimeOut

Gets or sets the timespan in which the user is willing to wait when the event processor is performing a receive operation.


ExceptionReceived ExceptionReceived ExceptionReceived

This event fires whenever an exception is encountered when processing events. User can register an handler to this event for getting exception notification.

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to