PartitionContext interface
Interface that describes the context passed to each of the functions that are a part
of the SubscriptionEventHandlers
. When implementing any of these functions, use
the context object to get information about the partition as well as the
ability to checkpoint.
Properties
consumer |
The consumer group name. |
event |
The event hub name. |
fully |
The fully qualified Event Hubs namespace. This is likely to be similar to .servicebus.windows.net |
last |
Information on the last enqueued event in the partition that is being processed.
This property is only updated if the |
partition |
The identifier of the Event Hub partition. |
Methods
update |
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. |
Property Details
consumerGroup
The consumer group name.
consumerGroup: string
Property Value
string
eventHubName
The event hub name.
eventHubName: string
Property Value
string
fullyQualifiedNamespace
The fully qualified Event Hubs namespace. This is likely to be similar to .servicebus.windows.net
fullyQualifiedNamespace: string
Property Value
string
lastEnqueuedEventProperties
Information on the last enqueued event in the partition that is being processed.
This property is only updated if the trackLastEnqueuedEventProperties
option is set to true
when creating an instance of EventProcessor.
lastEnqueuedEventProperties?: LastEnqueuedEventProperties
Property Value
partitionId
The identifier of the Event Hub partition.
partitionId: string
Property Value
string
Method Details
updateCheckpoint(ReceivedEventData)
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.
function updateCheckpoint(eventData: ReceivedEventData): Promise<void>
Parameters
- eventData
- ReceivedEventData
The event that you want to update the checkpoint with.
Returns
Promise<void>