Event listener properties

Shweta 81 Reputation points
2021-09-02T14:18:07.817+00:00

What are the purpose of the following:

  1. batchCheckpointFrequency - 1 - The number of event batches to process before creating an EventHub cursor checkpoint. 2. eventProcessorOptions/maxBatchSize - 10 - The maximum event count received per receive loop. 3. eventProcessorOptions/prefetchCount - 300 - The default pre-fetch count used by the underlying EventProcessorHost. The minimum allowed value is 10.
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
558 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 77,751 Reputation points Microsoft Employee
    2021-09-06T06:04:03.867+00:00

    Hello @Shweta ,

    Thanks for the question and using MS Q&A platform.

    EventProcessorOptions defines four properties and one event:

    • MaxBatchSize: The maximum size of the collection you want to receive in an invocation of ProcessEventsAsync. This size is not the minimum, only the maximum size. If there are fewer messages to be received, ProcessEventsAsync executes with as many as were available.
    • PrefetchCount: A value used by the underlying AMQP channel to determine the upper limit of how many messages the client should receive. This value should be greater than or equal to MaxBatchSize.
    • InvokeProcessorAfterReceiveTimeout: If this parameter is true, ProcessEventsAsync is called when the underlying call to receive events on a partition times out. This method is useful for taking time-based actions during periods of inactivity on the partition.
    • InitialOffsetProvider: Enables a function pointer or lambda expression to be set, which is called to provide the initial offset when a reader begins reading a partition. Without specifying this offset, the reader starts at the oldest event, unless a JSON file with an offset has already been saved in the storage account supplied to the EventProcessorHost constructor. This method is useful when you want to change the behavior of the reader startup. When this method is invoked, the object parameter contains the partition ID for which the reader is being started.
    • ExceptionReceivedEventArgs: Enables you to receive notification of any underlying exceptions that occur in EventProcessorHost. If things are not working as you expect, this event is a good place to start looking.

    These are the DefaultOptions properties in the EventProcessorOptions.

    129465-image.png

    This article describes how to consume ingested events using the Event Processor Host (EPH); an intelligent consumer agent that simplifies the management of checkpointing, leasing, and parallel event readers.

    Hope this helps. Do let us know if you any further queries.

    ---------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful