EventProcessorClient provides a convenient mechanism to consume events from all partitions of an Event Hub in the context of a consumer group. Event Processor-based application consists of one or more instances of EventProcessorClient(s) which are set up to consume events from the same Event Hub, consumer group to balance the workload across different instances and track progress when events are processed. Based on the number of instances running, each EventProcessorClient may own zero or more partitions to balance the workload among all the instances.
To create an instance of EventProcessorClient, use the fluent EventProcessorClientBuilder.
public class EventProcessorClient
The identifier is a unique name given to this event processor instance.
Starts processing of events for all partitions of the Event Hub that this event processor can own, assigning a dedicated PartitionProcessor to each partition. If there are other Event Processors active for the same consumer group on the Event Hub, responsibility for partitions will be shared between them.
Subsequent calls to start will be ignored if this event processor is already running. Calling start after #stop() is called will restart this event processor.
Starting the processor to consume events from all partitions
Stops processing events for all partitions owned by this event processor. All PartitionProcessor will be shutdown and any open resources will be closed.
Subsequent calls to stop will be ignored if the event processor is not running.
Stopping the processor