diff --git a/pom.xml b/pom.xml index 87c5d5029..da4ff50e9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 1.8 - 2.8.2 + 2.8.4-SNAPSHOT 5.5.8 3.0.0 3.2.3-SNAPSHOT diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java index 9f2bbf0f6..b8c0277df 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java @@ -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> bindingServicePropertiesPerSbfb = this.kafkaStreamsBindingInformationCatalogue.getConsumerPropertiesPerSbfb();