|
|
@ -58,33 +58,33 @@ class KafkaAnnotationDrivenConfiguration {
|
|
|
|
|
|
|
|
|
|
|
|
private final KafkaAwareTransactionManager<Object, Object> transactionManager;
|
|
|
|
private final KafkaAwareTransactionManager<Object, Object> transactionManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ConsumerAwareRebalanceListener rebalanceListener;
|
|
|
|
|
|
|
|
|
|
|
|
private final ErrorHandler errorHandler;
|
|
|
|
private final ErrorHandler errorHandler;
|
|
|
|
|
|
|
|
|
|
|
|
private final BatchErrorHandler batchErrorHandler;
|
|
|
|
private final BatchErrorHandler batchErrorHandler;
|
|
|
|
|
|
|
|
|
|
|
|
private final AfterRollbackProcessor<Object, Object> afterRollbackProcessor;
|
|
|
|
private final AfterRollbackProcessor<Object, Object> afterRollbackProcessor;
|
|
|
|
|
|
|
|
|
|
|
|
private final ConsumerAwareRebalanceListener rebalanceListener;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KafkaAnnotationDrivenConfiguration(KafkaProperties properties,
|
|
|
|
KafkaAnnotationDrivenConfiguration(KafkaProperties properties,
|
|
|
|
ObjectProvider<RecordMessageConverter> messageConverter,
|
|
|
|
ObjectProvider<RecordMessageConverter> messageConverter,
|
|
|
|
ObjectProvider<BatchMessageConverter> batchMessageConverter,
|
|
|
|
ObjectProvider<BatchMessageConverter> batchMessageConverter,
|
|
|
|
ObjectProvider<KafkaTemplate<Object, Object>> kafkaTemplate,
|
|
|
|
ObjectProvider<KafkaTemplate<Object, Object>> kafkaTemplate,
|
|
|
|
ObjectProvider<KafkaAwareTransactionManager<Object, Object>> kafkaTransactionManager,
|
|
|
|
ObjectProvider<KafkaAwareTransactionManager<Object, Object>> kafkaTransactionManager,
|
|
|
|
|
|
|
|
ObjectProvider<ConsumerAwareRebalanceListener> rebalanceListener,
|
|
|
|
ObjectProvider<ErrorHandler> errorHandler,
|
|
|
|
ObjectProvider<ErrorHandler> errorHandler,
|
|
|
|
ObjectProvider<BatchErrorHandler> batchErrorHandler,
|
|
|
|
ObjectProvider<BatchErrorHandler> batchErrorHandler,
|
|
|
|
ObjectProvider<AfterRollbackProcessor<Object, Object>> afterRollbackProcessor,
|
|
|
|
ObjectProvider<AfterRollbackProcessor<Object, Object>> afterRollbackProcessor) {
|
|
|
|
ObjectProvider<ConsumerAwareRebalanceListener> rebalanceListener) {
|
|
|
|
|
|
|
|
this.properties = properties;
|
|
|
|
this.properties = properties;
|
|
|
|
this.messageConverter = messageConverter.getIfUnique();
|
|
|
|
this.messageConverter = messageConverter.getIfUnique();
|
|
|
|
this.batchMessageConverter = batchMessageConverter.getIfUnique(
|
|
|
|
this.batchMessageConverter = batchMessageConverter.getIfUnique(
|
|
|
|
() -> new BatchMessagingMessageConverter(this.messageConverter));
|
|
|
|
() -> new BatchMessagingMessageConverter(this.messageConverter));
|
|
|
|
this.kafkaTemplate = kafkaTemplate.getIfUnique();
|
|
|
|
this.kafkaTemplate = kafkaTemplate.getIfUnique();
|
|
|
|
this.transactionManager = kafkaTransactionManager.getIfUnique();
|
|
|
|
this.transactionManager = kafkaTransactionManager.getIfUnique();
|
|
|
|
|
|
|
|
this.rebalanceListener = rebalanceListener.getIfUnique();
|
|
|
|
this.errorHandler = errorHandler.getIfUnique();
|
|
|
|
this.errorHandler = errorHandler.getIfUnique();
|
|
|
|
this.batchErrorHandler = batchErrorHandler.getIfUnique();
|
|
|
|
this.batchErrorHandler = batchErrorHandler.getIfUnique();
|
|
|
|
this.afterRollbackProcessor = afterRollbackProcessor.getIfUnique();
|
|
|
|
this.afterRollbackProcessor = afterRollbackProcessor.getIfUnique();
|
|
|
|
this.rebalanceListener = rebalanceListener.getIfUnique();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
@ -97,10 +97,10 @@ class KafkaAnnotationDrivenConfiguration {
|
|
|
|
configurer.setMessageConverter(messageConverterToUse);
|
|
|
|
configurer.setMessageConverter(messageConverterToUse);
|
|
|
|
configurer.setReplyTemplate(this.kafkaTemplate);
|
|
|
|
configurer.setReplyTemplate(this.kafkaTemplate);
|
|
|
|
configurer.setTransactionManager(this.transactionManager);
|
|
|
|
configurer.setTransactionManager(this.transactionManager);
|
|
|
|
|
|
|
|
configurer.setRebalanceListener(this.rebalanceListener);
|
|
|
|
configurer.setErrorHandler(this.errorHandler);
|
|
|
|
configurer.setErrorHandler(this.errorHandler);
|
|
|
|
configurer.setBatchErrorHandler(this.batchErrorHandler);
|
|
|
|
configurer.setBatchErrorHandler(this.batchErrorHandler);
|
|
|
|
configurer.setAfterRollbackProcessor(this.afterRollbackProcessor);
|
|
|
|
configurer.setAfterRollbackProcessor(this.afterRollbackProcessor);
|
|
|
|
configurer.setRebalanceListener(this.rebalanceListener);
|
|
|
|
|
|
|
|
return configurer;
|
|
|
|
return configurer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|