@ -30,6 +30,7 @@ import org.springframework.kafka.core.DefaultKafkaConsumerFactory;
import org.springframework.kafka.core.KafkaTemplate ;
import org.springframework.kafka.listener.AfterRollbackProcessor ;
import org.springframework.kafka.listener.BatchErrorHandler ;
import org.springframework.kafka.listener.CommonErrorHandler ;
import org.springframework.kafka.listener.ConsumerAwareRebalanceListener ;
import org.springframework.kafka.listener.ErrorHandler ;
import org.springframework.kafka.listener.RecordInterceptor ;
@ -68,6 +69,8 @@ class KafkaAnnotationDrivenConfiguration {
private final BatchErrorHandler batchErrorHandler ;
private final CommonErrorHandler commonErrorHandler ;
private final AfterRollbackProcessor < Object , Object > afterRollbackProcessor ;
private final RecordInterceptor < Object , Object > recordInterceptor ;
@ -79,7 +82,7 @@ class KafkaAnnotationDrivenConfiguration {
ObjectProvider < KafkaTemplate < Object , Object > > kafkaTemplate ,
ObjectProvider < KafkaAwareTransactionManager < Object , Object > > kafkaTransactionManager ,
ObjectProvider < ConsumerAwareRebalanceListener > rebalanceListener , ObjectProvider < ErrorHandler > errorHandler ,
ObjectProvider < BatchErrorHandler > batchErrorHandler ,
ObjectProvider < BatchErrorHandler > batchErrorHandler , ObjectProvider < CommonErrorHandler > commonErrorHandler ,
ObjectProvider < AfterRollbackProcessor < Object , Object > > afterRollbackProcessor ,
ObjectProvider < RecordInterceptor < Object , Object > > recordInterceptor ) {
this . properties = properties ;
@ -92,6 +95,7 @@ class KafkaAnnotationDrivenConfiguration {
this . rebalanceListener = rebalanceListener . getIfUnique ( ) ;
this . errorHandler = errorHandler . getIfUnique ( ) ;
this . batchErrorHandler = batchErrorHandler . getIfUnique ( ) ;
this . commonErrorHandler = commonErrorHandler . getIfUnique ( ) ;
this . afterRollbackProcessor = afterRollbackProcessor . getIfUnique ( ) ;
this . recordInterceptor = recordInterceptor . getIfUnique ( ) ;
}
@ -110,6 +114,7 @@ class KafkaAnnotationDrivenConfiguration {
configurer . setRebalanceListener ( this . rebalanceListener ) ;
configurer . setErrorHandler ( this . errorHandler ) ;
configurer . setBatchErrorHandler ( this . batchErrorHandler ) ;
configurer . setCommonErrorHandler ( this . commonErrorHandler ) ;
configurer . setAfterRollbackProcessor ( this . afterRollbackProcessor ) ;
configurer . setRecordInterceptor ( this . recordInterceptor ) ;
return configurer ;