public class EventProcessor extends Object
To create an instance of EventProcessor, use the fluent EventProcessorBuilder.
EventProcessorBuilder| Modifier and Type | Method and Description |
|---|---|
String |
getIdentifier()
The identifier is a unique name given to this event processor instance.
|
void |
start()
Starts processing of events for all partitions of the Event Hub that this event processor can own, assigning a
dedicated
PartitionProcessor to each partition. |
void |
stop()
Stops processing events for all partitions owned by this event processor.
|
public String getIdentifier()
public void start()
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 EventProcessor.stop() is called will restart this event processor.
Starting the processor to consume events from all partitions
eventProcessor.start(); // Continue to perform other tasks while the processor is running in the background. eventProcessor.stop();
public void stop()
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
eventProcessor.start(); // Continue to perform other tasks while the processor is running in the background. eventProcessor.stop();
Copyright © 2019 Microsoft Corporation. All rights reserved.