mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Spring Kafka 4.2 adds ContainerProperties#setAwaitAsyncResultsOnStop: when the container stops, in-flight asynchronous listener results (CompletableFuture, Mono, Kotlin suspend functions) are awaited within the shutdown timeout and cancelled afterwards, so that listener work does not outlive the container. This commit adds spring.kafka.listener.await-async-results-on-stop so that this can be enabled with configuration rather than a ContainerCustomizer. See gh-51774 Signed-off-by: Nikita Kibitkin <nikita.n.kibitkin@gmail.com>