spring-attic / spring-cloud-stream-binder-kafka

Spring Cloud Stream binders for Apache Kafka and Kafka Streams
Apache License 2.0
331 stars 301 forks source link

Spring Boot web endpoints are queryable before HostInfo becomes available #1185

Closed TiewKH closed 2 years ago

TiewKH commented 2 years ago

I was advised in my StackOverflow question to post this as an issue here.

When my Spring Boot application starts, it exposes the web endpoints before HostInfo and state store becomes available. Thus, users will face exceptions when calling the endpoint in that period of time.

Is this the expected behaviour?

Versions: Spring Boot 2.6.2 Spring Cloud Stream, Spring Cloud Stream Binder Kafka Core, Spring Cloud Stream Binder Kafka Streams 3.2.1 Spring Kafka 2.8.1

sobychacko commented 2 years ago

@TiewKH This is now fixed in main and 3.1.x. Basically, the same retry properties mentioned here for maxAttempts and backoffPeriod can be used for retrying the hostinfo methods now. See this commit for more details.