Closed hktechn0 closed 3 years ago
Thanks for your feedback :)
Yeah, after I saw several troubles that are caused by leaking a DeferredCompletion
, it turns out that managing it properly and make sure to absolutely complete it is sometimes not an easy challenge and the consequence is really bad.
I'm +1 for adding kind of some support that lets users to configure forcing a DeferredCompletion
to complete at some point even without an acknowledgement from the decaton processor.
Let me ask you few questions to consider the most suitable interface and implementation.
DeferredCompletion
completes forcefully, the corresponding record is considered as completed and the offset gets committed, so if it was not actually completed (failed) or the consumer instances crashes before it completes processing, it will lost. Is it fine for you?deferCompletion()
call like deferCompletion(Duration)
or, would it be sufficient to have single global timeout configured for each subscription?Thanks for answering. I got your feedback and will take it into account when designing this feature :)
closing by https://github.com/line/decaton/pull/99
We want a feature setting a timeout for
ProcessingContext.deferCompletion()
to avoid stuckDecatonProcessor
in any case.Decaton supports async task processing with using
deferCompletion()
on processor. However, async processing usually makes a bug and it might miss to callcomplete()
. Finally, it causes critical issue of consuming topics.If decaton has a timeout for
deferCompletion()
, we can avoid such outage in most cases.