AbstractEventProcessor Class

Abstract that must be extended by event processor classes.

Inheritance
AbstractEventProcessor

Constructor

AbstractEventProcessor(params=None)

Parameters

params
default value: None

Methods

close_async

Called by processor host to indicate that the event processor is being stopped.

open_async

Called by processor host to initialize the event processor.

process_error_async

Called when the underlying client experiences an error while receiving. EventProcessorHost will take care of recovering from the error and continuing to pump messages.

process_events_async

Called by the processor host when a batch of events has arrived. This is where the real work of the event processor is done.

close_async

Called by processor host to indicate that the event processor is being stopped.

abstract async close_async(context, reason)

Parameters

context
PartitionContext
Required

Information about the partition

reason
str
Required

The reason for closing.

open_async

Called by processor host to initialize the event processor.

abstract async open_async(context)

Parameters

context
PartitionContext
Required

Information about the partition

process_error_async

Called when the underlying client experiences an error while receiving. EventProcessorHost will take care of recovering from the error and continuing to pump messages.

abstract async process_error_async(context, error)

Parameters

context
PartitionContext
Required

Information about the partition

error
Required

The error that occured.

process_events_async

Called by the processor host when a batch of events has arrived. This is where the real work of the event processor is done.

abstract async process_events_async(context, messages)

Parameters

context
PartitionContext
Required

Information about the partition

messages
list[EventData]
Required

The events to be processed.