I recently added graceful shutdown to a handful of Spring Boot services (server.shutdown=graceful
). These services all have Kafka and SQS listeners in them. Does this property also cause the listeners to stop taking new messages/events, and continue to handle ones in-progress, similar to how it works for HTTP requests? I'm concerned that when a new deployment goes live during the graceful shutdown period of the previous one, there will be multiple instances of the same Kafka/SQS consumers, which may lead to issues.
A few of the services are on Spring Boot 2.3+, so I was able to use the Spring Boot provided configuration in our application profile. But for others, I had to implement something like this.