We are migrating from spring 5 to 6. I am encountering issues with following methods related to spring-kafka.
SetErrorHandler deprecated in favor of CommonErrorHandler -> i replaced this with setCommonErrorHandler(Recoverer,Back off)
factory.setRetryTemplate(neverRetry...) -> removed in favor of CommonErrorHandler. I want to set a "neverRetry" so that recoveryCallback can address the retries.
factory.setRecoveryCallback -> removed in favor of CommonErrorHandler. I want to check the exception thrown and give it to errorhandler only for a specific exception and just log/return in case of all other exceptions.
I am looking for suggestions to handle point #2 and #3 after moving to 3.0.1. How can I set the commonErrorHandler effectively to replicate the same behavior we had when running on 2.7.14.
I replaced SetErrorHandler with setCommonErrorHandler(Recoverer,Back off) but this is not sufficient for our use case. We need to check the type of exception and use error handler only if reception is a specific one. (Which was earlier achieved through recoveryCallback method)