File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
spring-kafka/src/main/java/org/springframework/kafka Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -201,12 +201,15 @@ public final boolean initialize() {
201201 addOrModifyTopicsIfNeeded (adminClient , newTopics );
202202 return true ;
203203 }
204- catch (Exception e ) {
204+ catch (InterruptedException ex ) {
205+ Thread .currentThread ().interrupt ();
206+ }
207+ catch (Exception ex ) {
205208 if (!this .initializingContext || this .fatalIfBrokerNotAvailable ) {
206- throw new IllegalStateException ("Could not configure topics" , e );
209+ throw new IllegalStateException ("Could not configure topics" , ex );
207210 }
208211 else {
209- LOGGER .error (e , "Could not configure topics" );
212+ LOGGER .error (ex , "Could not configure topics" );
210213 }
211214 }
212215 finally {
Original file line number Diff line number Diff line change @@ -488,7 +488,11 @@ protected void checkTopics() {
488488 entry .getValue ().get (this .topicCheckTimeout , TimeUnit .SECONDS );
489489 return false ;
490490 }
491- catch (@ SuppressWarnings ("unused" ) Exception e ) {
491+ catch (InterruptedException ex ) {
492+ Thread .currentThread ().interrupt ();
493+ return true ;
494+ }
495+ catch (@ SuppressWarnings ("unused" ) Exception ex ) {
492496 return true ;
493497 }
494498 })
You can’t perform that action at this time.
0 commit comments