Skip to content

Commit

Permalink
fix(kafka-runner): prevent first startup error on topic creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Feb 18, 2022
1 parent 3b83ef7 commit 6b23cc1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ public void createIfNotExist(TopicsConfig topicConfig) {
}}).all().get();

log.info("Topic Config '{}' updated", newTopic.name());
} catch (TopicExistsException ignored) {
} catch (InterruptedException | ExecutionException e1) {
throw new RuntimeException(e);
} catch (ExecutionException | InterruptedException exception) {
if (!(exception.getCause() instanceof TopicExistsException)) {
log.warn("Unable to update topic '{}'", newTopic.name(), exception);
}
}
} else {
throw new RuntimeException(e);
Expand Down

0 comments on commit 6b23cc1

Please sign in to comment.