I have a azure eventhub and has multiple consumers for the eventhub. Checkpoint are available for these consumers. I would like to replay the messages for a specific consumer. How can I achieve this? and if it is by changing the sequence number/offset value then what number should I use in the sequence number or offset value to replay messages and where should I get those values?
Asked
Active
Viewed 48 times
0
-
replay from where, from the earliest possible moment or a specific time? What language are you using? – Peter Bons Aug 24 '23 at 06:51
-
Knowing the Azure SDK package that you're using would also help. – Jesse Squire Aug 24 '23 at 13:22
-
Replay the message from last couple of days. or from a specific date. We are using C#. – Madhu Aug 26 '23 at 09:37
-
C# is a language, not the package and version. There are multiple generations of the Azure SDK for .NET and each would have a different answer. – Jesse Squire Aug 27 '23 at 16:03
-
Hi @JesseSquire, Here are the SDKs we are using `
` and we are on .NET 6. – Madhu Aug 29 '23 at 04:42
1 Answers
0
To reset processing and restart from the beginning of each partition, you'll first want to stop your Function application. Attempting to manipulate or remove data while its running is not a good idea and may manifest in unexpected ways.
Next, you'll want to verify that your host.json configuration either does not specify the initialOffsetOptions or sets the type as "fromStart". For example:
{
"version": "2.0",
"extensions": {
"eventHubs": {
"initialOffsetOptions" : {
"type" : "fromStart",
"enqueuedTimeUtc" : ""
}
}
}
}
Next, you'll need to remove the checkpoint data. Your best option would be to delete the checkpoint and ownership blobs that the trigger writes.
When you start the Function app running again, it won't find checkpoints and will use the "initialOffsetOptions" as a default starting position, reading from the beginning of each partition.

Jesse Squire
- 6,107
- 1
- 27
- 30