Reputation: 1723
I'm trying to work with Eventhub and consumergroups. My intention is to store the checkpoint after "n" reads. But I can't find a way to do this. With the nodejs or java API how can I perform this? If I store the checkpoint and I reboot the app it should read from the checkpoint right?
Upvotes: 0
Views: 389
Reputation: 30005
To use nodejs to set checkpoint, you can follow my previous answer here.
If I store the checkpoint and I reboot the app it should read from the checkpoint right?
Yes, because the checkpoint is stored in azure blob storage, the eph knows where to start reading the event data.
For your questions in comment: But it is not clear to me what is the difference between checkpoint and offset
The checkpoint, you can consider it as an action or method, after you execute the checkpoint method in code(you can find it in my answer in the above link), then in the blob storage, there is a json file generated. And in the json file, it defines the offset / sequence number, which are used by the eph to determine where you can start to read the event data. You can refer to this screenshot of json file:
Upvotes: 1