Search code examples
azure-functionsazure-eventhub

EventHubTrigger what is happening with the checkpoints?


We are upgrading our eventhub package to latest webjobs.eventhub which now uses Azure.Messaging.EventHubs.

We use EventHubTrigger.

Checkpoint seems to have changed, and I am trying to understand what this change will do.

where it used to be

azure-webjobs-eventhub/{namespace}/{eventhub}/{consumergroup}/{partitionfile}

it is now -

azure-webjobs-eventhub/{namespace}/{eventhub}/{consumergroup}/checkpoint/{partitionfile}

azure-webjobs-eventhub/{namespace}/{eventhub}/{consumergroup}/ownership/{partitionfile}

I understand the change and fine, we can still upgrade we can start the eventhub from a time so that it doesn't start consuming everything.

However, what I am concerned about is:

all the partition files are "blank" they are "0 bytes" in both checkpoint folder and ownership folder.

I am not seeing any other place where this checkpoint is maintained.

I assume it is doing this in memory while the app is running, but what about if I stopped my app and rerun will it start again, because I cannot see how it could continue?


Solution

  • When you upgrade the bindings, the v5.x line will read the legacy checkpoint and preserve your previous location in the stream. When a new checkpoint is written, it will be in the current format and will take precedence over the legacy instance going forward.

    Checkpoint and ownership information for the Azure.Messaging.EventHubs family of packages are stored in the metadata for the blob. This allows it to be queried and modified without the need to download the blob content and perform serialization.