http-connector-for-apache-kafka icon indicating copy to clipboard operation
http-connector-for-apache-kafka copied to clipboard

Make use of RetriableException

Open 1riatsila1 opened this issue 2 years ago • 1 comments

In order to make use of the kafka connector retrying mechanism, would it be possible to throw a RetriableException instead of a ConnectException here and here. This would enable us to make use of these configuration options.

The functionality that would be nice to have is that after the connector fails (after max.retries is exhausted) is that kafka automatically retries on set intervals to bring the connector back.

1riatsila1 avatar Apr 12 '22 09:04 1riatsila1

@1riatsila1 thanks and apologies for the belated response.

As I mentioned on #111, falling back to use RetriableException for error handling would require to refactor and break compatibility with the current error retry approach. If the intention is to keep using the same retries and use connect retries as an additional safeguard, I found that rather hard to reason about. Users would have to change 2 separate exception handling approaches.

Connect retries would also eventually be exhausted as well, though I agree a backoff approach would be a better experience than the current fixed retries. An alternative may be to implement the backoff strategy within the connector itself. wdyt?

jeqo avatar Jul 05 '23 08:07 jeqo