Kafka Streams binder uncaught exception changes
The default StreamsUncaughtExceptionHandler is added only if the application does not provide one.
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -21,7 +21,7 @@
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-kafka.version>2.8.2</spring-kafka.version>
|
||||
<spring-kafka.version>2.8.4-SNAPSHOT</spring-kafka.version>
|
||||
<spring-integration-kafka.version>5.5.8</spring-integration-kafka.version>
|
||||
<kafka.version>3.0.0</kafka.version>
|
||||
<spring-cloud-stream.version>3.2.3-SNAPSHOT</spring-cloud-stream.version>
|
||||
|
||||
@@ -96,8 +96,10 @@ public class StreamsBuilderFactoryManager implements SmartLifecycle {
|
||||
// By default, we shut down the client if there is an uncaught exception in the application.
|
||||
// Users can override this by customizing SBFB. See this issue for more details:
|
||||
// https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1110
|
||||
streamsBuilderFactoryBean.setStreamsUncaughtExceptionHandler(exception ->
|
||||
StreamsUncaughtExceptionHandler.StreamThreadExceptionResponse.SHUTDOWN_CLIENT);
|
||||
if (streamsBuilderFactoryBean.getStreamsUncaughtExceptionHandler() == null) {
|
||||
streamsBuilderFactoryBean.setStreamsUncaughtExceptionHandler(exception ->
|
||||
StreamsUncaughtExceptionHandler.StreamThreadExceptionResponse.SHUTDOWN_CLIENT);
|
||||
}
|
||||
// Starting the stream.
|
||||
final Map<StreamsBuilderFactoryBean, List<ConsumerProperties>> bindingServicePropertiesPerSbfb =
|
||||
this.kafkaStreamsBindingInformationCatalogue.getConsumerPropertiesPerSbfb();
|
||||
|
||||
Reference in New Issue
Block a user