Give the client a chance to save offset on graceful shutdown #396
ppou-novibet
started this conversation in
Ideas
Replies: 2 comments 6 replies
-
|
Hi @ppou-novibet, |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
We have the very same requirment and resolved it by registering a StoreOffset delegate in |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a stream with
IsSingleActiveConsumer=trueand I am tracking the offset as messages are being consumed, periodically saving the offset by callingconsumer.StoreOffsetas described in the documentation.However I haven't found a clean way of saving the last consumed offset just before shutting down my application.
One nice way of doing that is if I could provide a callback to
Consumer.Createthat would be called just before the consumer is closed. The callback would receive theRawConsumerand it would be able to callconsumer.StoreOffsetto save last offset to stream.Beta Was this translation helpful? Give feedback.
All reactions