This method is called before the partition processor is closed by the EventProcessor.
The reason for closing this partition processor.
This method is called when the EventProcessor
takes ownership of a new partition and before any
events are received.
This method is called when an error occurs while receiving events from Event Hubs.
The error to be processed.
This method is called when new events are received.
This is also a good place to update checkpoints as appropriate.
The received events to be processed.
Updates the checkpoint using the event data.
A checkpoint is meant to represent the last successfully processed event by the user from a particular partition of a consumer group in an Event Hub instance.
The event that you want to update the checkpoint with.
Promise
Updates the checkpoint using the given offset and sequence number.
A checkpoint is meant to represent the last successfully processed event by the user from a particular partition of a consumer group in an Event Hub instance.
The sequence number of the event that you want to update the checkpoint with.
The offset of the event that you want to update the checkpoint with.
Promise
Generated using TypeDoc
The
PartitionProcessor
is responsible for processing events received from Event Hubs when usingEventProcessor
The EventProcessor creates a new instance of the PartitionProcessor for each partition of the event hub it starts processing. When you extend the
PartitionProcessor
in order to customize it as you see fit,processEvents()
method to add the code to process the received events. This is also a good place to update the checkpoints using theupdateCheckpoint()
methodprocessError()
method to handle any error that might have occurred when processing the events.initialize()
method to implement any set up related tasks you would want to carry out before starting to receive events from the partitionclose()
method to implement any tear down or clean up tasks you would want to carry out.