EventProcessorOptions Class
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.
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
- Inheritance
-
EventProcessorOptions
Constructors
EventProcessorOptions() |
Properties
DefaultOptions |
Gets the default options, which is 10 for the MaxBatchSize, and 1 minute for the ReceiveTimeOut property. |
EnableReceiverRuntimeMetric |
Gets or sets a value indicating whether the runtime metric of a receiver is enabled. |
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 |
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 |
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 |
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 |
Gets or sets the timespan in which the user is willing to wait when the event processor is performing a receive operation. |
Events
ExceptionReceived |
This event fires whenever an exception is encountered when processing events. User can register an handler to this event for getting exception notification. |
Applies to
Azure SDK for .NET