$ the-wire · showcase
Kafka config building centralized, async listener results awaited on stop
By RepoJournal · Filed · About Spring · Composed from the cited sources · methodology
Spring Boot consolidates all Kafka property mapping into a single builder while Spring Kafka gains opt-in lifecycle binding for async listener work, and Spring Integration closes three startup and shutdown correctness bugs.
Introduce KafkaConfigBuilder spring-projects/spring-boot
KafkaConfigBuilder becomes the sole source of Kafka property mapping and applies ConnectionDetails where needed, so the equivalent mapping in KafkaProperties is deprecated and the auto-configuration customization is gone. Code reaching into KafkaProperties for that mapping should move to the builder.
GH-4519: Await async results on container stop spring-projects/spring-kafka
In-flight async listener results (CompletableFuture, Mono, Kotlin suspend) were previously abandoned on stop: the consumer thread left the poll loop, committed what it had and closed while the async work kept running against beans being destroyed. Opt in via ContainerProperties.awaitAsyncResultsOnStop (default false); in-flight results now settle within shutdownTimeout and are then cancelled, w...
GH-11420: Reset the running state when a file source fails to start spring-projects/spring-integration
FileReadingMessageSource.start() flipped running before creating and validating the directory, so a failure there left isRunning() true and every later start() returned at the first line with the scanner never started; AbstractInboundFileSynchronizingMessageSource.start() had the same shape around fileSource.start(). Starting is now deferred into a private method that resets state on failure.
GH-11414: Do not strip 'queues/' prefix from AMQP 1.0 'replyTo' spring-projects/spring-integration
AmqpClientInboundGateway.publishReply() was stripping the queues/ prefix from the parsed routing key, and RabbitAmqpTemplate then percent-encoded the already-encoded reply-to address a second time, publishing a reply for a queue named reply queue to the non-existent /queues/reply%2520queue. AMQP 1.0 requesters with prefixed reply-to addresses were getting replies that never arrived.
GH-4277: Add container start/stop count metrics spring-projects/spring-kafka
Two Micrometer counters, spring.kafka.container.start.count and spring.kafka.container.stop.count, now track listener container lifecycle, the stop counter covering both normal and abnormal paths, with protected recordContainerStarted() and recordContainerStopped() hooks. The rest is small: duplicated tests corrected in Spring Boot, spring.http.clients.cookie-handling wired into HttpComponentsH...