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() {
201
201
addOrModifyTopicsIfNeeded (adminClient , newTopics );
202
202
return true ;
203
203
}
204
- catch (Exception e ) {
204
+ catch (InterruptedException ex ) {
205
+ Thread .currentThread ().interrupt ();
206
+ }
207
+ catch (Exception ex ) {
205
208
if (!this .initializingContext || this .fatalIfBrokerNotAvailable ) {
206
- throw new IllegalStateException ("Could not configure topics" , e );
209
+ throw new IllegalStateException ("Could not configure topics" , ex );
207
210
}
208
211
else {
209
- LOGGER .error (e , "Could not configure topics" );
212
+ LOGGER .error (ex , "Could not configure topics" );
210
213
}
211
214
}
212
215
finally {
Original file line number Diff line number Diff line change @@ -488,7 +488,11 @@ protected void checkTopics() {
488
488
entry .getValue ().get (this .topicCheckTimeout , TimeUnit .SECONDS );
489
489
return false ;
490
490
}
491
- catch (@ SuppressWarnings ("unused" ) Exception e ) {
491
+ catch (InterruptedException ex ) {
492
+ Thread .currentThread ().interrupt ();
493
+ return true ;
494
+ }
495
+ catch (@ SuppressWarnings ("unused" ) Exception ex ) {
492
496
return true ;
493
497
}
494
498
})
You can’t perform that action at this time.
0 commit comments