This change allows users to specify the point in an event stream that processing should start at if no checkpoint exists. Checkpoints per Event Hubs partition is maintained in storage and existing values if any should be deleted for this configuration to apply on the first run of the function(s).
Event Hubs extension configuration options added to host.json:
"eventHubs": {
....
"initialOffsetOptions": {
"type": "<fromStart OR fromEnd OR fromEnqueuedTime>",
"enqueuedTime": "<time in any format supported DateTime.Parse() e.g. 2020-10-26T20:31Z>"
}
}
Initial Offset options supported:
fromStart: The default option if not specified. Will start processing from the start of the stream.
fromEnd: Will start processing events from the end of the stream. Use this option if you only want to process events that are added after the function starts.
fromEnqueuedTime: Will process events that were enqueued by Event Hubs on or after the specified time. Note that this applies to all Event Hubs partitions and there is no support for specifying a per-partition value.
Design considerations:
Of the five supported offset options supported by the Event Hubs processor, only three are supported by this change as the other two make sense in the context of a partition and allowing for partition IDs to be specified complicates the host.json configuration and could lead to user errors. We will consider supporting "fromSequenceNumber" and "fromOffset" if there is a need by customers.
Pull request checklist
[ ] My changes do not require documentation changes
This change allows users to specify the point in an event stream that processing should start at if no checkpoint exists. Checkpoints per Event Hubs partition is maintained in storage and existing values if any should be deleted for this configuration to apply on the first run of the function(s).
Event Hubs extension configuration options added to host.json:
Initial Offset options supported:
Design considerations:
Pull request checklist
release_notes.md