Taras
Taras

Reputation: 103

Azure Event Hub - Receiving events in batches C#

How do I read events in batches, let's say by batch of 50? Azure function implements batch processing but Azure.Messaging.EventHubs Nuget doesn't provide that functionality out of the box.

Upvotes: 1

Views: 2331

Answers (1)

Jesse Squire
Jesse Squire

Reputation: 7875

The answer to this depends on your scenario; if you'd prefer to read from a single partition and to have explicit control, the PartitionReceiver allows reading in batches. [sample]

If you're looking to work with an event processor type that handles load balancing, checkpointing, and resiliency, theEventProcessor<T>offers the extension point for batch-based processing as well as other customization and control. [sample]

Upvotes: 3

Related Questions