From 60f7de77dedcc82394622b26ed1eb7269521e9f6 Mon Sep 17 00:00:00 2001 From: Calder White Date: Thu, 1 Feb 2024 14:27:09 -0500 Subject: [PATCH] Update Consuming.md seek documentation --- docs/Consuming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Consuming.md b/docs/Consuming.md index 24119b959..7f29b6203 100644 --- a/docs/Consuming.md +++ b/docs/Consuming.md @@ -349,7 +349,7 @@ await consumer.subscribe({ topics: ['example'] }) // you don't need to await consumer#run consumer.run({ eachMessage: async ({ topic, message }) => true }) -consumer.seek({ topic: 'example', partition: 0, offset: 12384 }) +consumer.seek({ topic: 'example', partition: 0, offset: "12384" }) ``` Upon seeking to an offset, any messages in active batches are marked as stale and discarded, making sure the next message read for the partition is from the offset sought to. Make sure to check `isStale()` before processing a message using [the `eachBatch` interface](#each-batch) of `consumer.run`.