GH-1140: CommonErrorHandler per consumer binding (#1143)
* GH-1140: CommonErrorHandler per consumer binding Setting CommonErrorHandler on consumer binding through its bean name. If present, binder will resolve this bean and assign it on the listener container. Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1140 * Addressing PR review
This commit is contained in:
@@ -210,6 +210,12 @@ public class KafkaConsumerProperties {
|
||||
*/
|
||||
private boolean txCommitRecovered = true;
|
||||
|
||||
/**
|
||||
* CommonErrorHandler bean name per consumer binding.
|
||||
* @since 3.2
|
||||
*/
|
||||
private String commonErrorHandlerBeanName;
|
||||
|
||||
/**
|
||||
* @return if each record needs to be acknowledged.
|
||||
*
|
||||
@@ -529,4 +535,11 @@ public class KafkaConsumerProperties {
|
||||
this.txCommitRecovered = txCommitRecovered;
|
||||
}
|
||||
|
||||
public String getCommonErrorHandlerBeanName() {
|
||||
return commonErrorHandlerBeanName;
|
||||
}
|
||||
|
||||
public void setCommonErrorHandlerBeanName(String commonErrorHandlerBeanName) {
|
||||
this.commonErrorHandlerBeanName = commonErrorHandlerBeanName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user