I have got an application that uses SpringBoot 2.10.0.Release and kafka in the version 2.10.0. The application has got a simple producer and consumer: The sender works with KafkaTemplate and the consumer with KafkaListener. What I try to achieve is to be able to start the SpringBoot application even if the KafkaServer is not running. Currently without a running KafkaBroker the application cannot be started with this error message:
org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.errors.TimeoutException Is there a way to achieve this and if yes could anybody give me hint or a keyword how to manage this?
@Profile("profileName")so if you start your spring-boot app with diffrent profile as you provided in annotation, then this bean will be not initzialized