I am pleased to announce that Spring for Apache Kafka 2.9.0 is now available.
This version is not provided by Spring Boot dependency management, but it can be used with Boot 2.7 (or 2.6), as long as you override the Kafka dependencies to 3.2.0 as described in this appendix, especially if you are using the embedded Kafka broker.
I am pleased to announce that the release candidate Spring for Apache Kafka 2.9.0 is now available (2.9.0-RC1) in the Spring Milestone Repo.
This version is not provided by Spring Boot dependency management, but it can be used with Boot 2.7 (or 2.6), as long as you override the Kafka dependencies as described in this appendix, especially if you are using the embedded Kafka broker.
Notable Changes
This version uses the 3.2.0 kafka-clients version
Non-blocking retry bootstrapping is now more robust
New Error Handler Mode
By default, after an error, the DefaultErrorHandler performs seeks on the remaining records from the last poll and re-fetches them from the broker on the next poll. With high error rates and large max.poll.records, this can cause unnecessary strain on the network. For this reason, the error handler has a new property seekAfterError, when set to false, instead of seeking the records, the remaining records are retained in memory and the consumer paused for the next poll (or multiple polls if the error handler is configured to use the ContainerPausingBackOffHandler…
The recently released versions of Spring AMQP (2.4.0, 2.3.12, 2.2.20) contain a fix for CVE-2021-22095, which can cause a potential OutOfMemoryError for very large messages.
Spring Boot version 2.6.0 and 2.5.7 will bring in the 2.4.0 and 2.3.12 versions of spring-amqp respectively. Users of Boot 2.4.x should override the spring-amqp and spring-rabbit versions to 2.3.12; users of Spring Boot 2.3.x should override the versions to 2.2.20.
I am pleased to announce that Spring for Apache Kafka 2.7.0 is now available.
This release contains a significant enhancement, which is a community contribution. Failed deliveries can be forwarded to a series of topics for delayed redelivery.
It is best described with an example:
@RetryableTopic(attempts = "5", backoff = @Backoff(delay = 1000, multiplier = 2.0))
@KafkaListener(id = "sk270", topics = "sk270")
public void listen(String in, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) {
LOG.info(in + " from " + topic);
throw new RuntimeException("test");
}
@DltHandler
public void…
kafka-clients 2.5.0 (alignment of version numbers is coincidental).
Support for re-committing retryable offset commit exceptions for retained partitions when using cooperative rebalancing.
Support for the new "fetch-offset-request" procuder fencing (when brokers are 2.5 or higher), requiring fewer producers.
Support for static group membership.
More integration with Micrometer.
Optional Delivery Attempts header.
RecoveringBatchErrorHandler can commit a partial batch and replay from failed record in a batch (with cooperation of the listener); this is now the default for a batch listener.
To support last week’s Apache Kafka 2.4.0 release, I am pleased to announce that the Spring for Apache Kafka 2.4 - 2.4.0.RELEASE - is available in maven central.
This version is essentially functionally equivalent to 2.3.x, but is compiled against the 2.4.0 kafka-clients and supports the new incremental rebalancing protocol.
The 2.4.0 kafka-clients are not binary compatible with Spring for Apache Kafka 2.3 so if you wish to use the 2.4.0 clients, you must upgrade to this version. See the appendix in the reference manual for how to override the jar versions, especially if you are using Spring…