Skip to content

Commit

Permalink
SBFM issues with afterSingletonsInstantiated
Browse files Browse the repository at this point in the history
Related to GH-2935. Ensure that afterSingletonsInstantiated is called
even when autoStartup is not enabled.
  • Loading branch information
sobychacko committed Apr 13, 2024
1 parent 5fb122e commit 3298d0d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public synchronized void start() {
this.kafkaStreamsBindingInformationCatalogue.getConsumerPropertiesPerSbfb();
final List<ConsumerProperties> consumerProperties = bindingServicePropertiesPerSbfb.get(streamsBuilderFactoryBean);
final boolean autoStartupDisabledOnAtLeastOneConsumerBinding = consumerProperties.stream().anyMatch(consumerProperties1 -> !consumerProperties1.isAutoStartup());
if (streamsBuilderFactoryBean instanceof SmartInitializingSingleton) {
((SmartInitializingSingleton) streamsBuilderFactoryBean).afterSingletonsInstantiated();
}
if (!autoStartupDisabledOnAtLeastOneConsumerBinding) {
if (streamsBuilderFactoryBean instanceof SmartInitializingSingleton) {
((SmartInitializingSingleton) streamsBuilderFactoryBean).afterSingletonsInstantiated();
}
streamsBuilderFactoryBean.start();
this.kafkaStreamsRegistry.registerKafkaStreams(streamsBuilderFactoryBean);
}
Expand Down

0 comments on commit 3298d0d

Please sign in to comment.