Closed myazinn closed 9 months ago
Thanks for your PR @myazinn . I am afraid we cannot accept it.
The purpose of a time out is to abort an operation that is taking too long and is therefor unlikely to succeed. Sure, you can retry this, but it should never be tried indefinitely, RetriableCommitFailedException
exceptions can be retried indefinitely.
In short, zio-kafka cannot decide how often a commit timeout should be retried. Therefore, we have to delegate this to the user. The user can either increase the timeout, or do a retry in their code.
Okay, I am re-reading the code. And now I see that there is also the user provided policy... Have to think more about this 🙂
@myazinn Can you tell a bit about what motivated you to write this PR?
See also #1126
Hi @erikvanoosten
I am afraid we cannot accept it.
If that's the case, no worries, we'll add it on our side :) I just thought it was overlooked
Can you tell a bit about what motivated you to write this PR?
One of our services has been failing from time to time (once or twice in a month) with timeouts after we updated zio-kafka
several months ago. It's unclear why it fails since a lot of others work fine, but usually it timeouts a few times and then works fine. I was surprised too see that even though we use commitOrRetry
, it doesn't retry anything and just restarts
My earlier reasoning didn't make sense. Thanks for your PR @myazinn.
Though this is a debatable change, I think it's not obious that
Consumer.CommitTimeout
exception is not retrieable when usingOffset#commitOrRetry
orOffsetBatch#commitOrRetry
.