Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreOn behalf of the team and everyone who contributed, I'm happy to announce that Spring for Apache Kafka 4.2.0 is available in Maven Central, together with the 4.1.3 and 4.0.9 maintenance releases.
7.1 and kafka-clients 4.4.0.The embedded broker of Apache Kafka 4.4.0 requires the kafka-clients test fixtures and BouncyCastle; spring-kafka-test now brings both in transitively.
maxRecoveryFailures option on the DefaultErrorHandler and DefaultAfterRollbackProcessor to stop redelivering a record when its recoverer keeps throwing (for example, when the dead-letter topic is unavailable).CommonErrorHandler.clearThreadStateFor(Collection<TopicPartition>): after a successful batch, the container clears the retry state only for the partitions in that batch.DeadLetterPublishingRecoverer checks that the destination partition exists when recovering batch listener records, as it already did for record listeners.CommonDelegatingErrorHandler supports the KafkaHeaders.DELIVERY_ATTEMPT header.DefaultAfterRollbackProcessor include the leader epoch of the record, which allows the consumer to detect log truncation.awaitAsyncResultsOnStop container property: on stop, the consumer waits up to the shutdownTimeout for in-flight async listener results (CompletableFuture, Mono, Kotlin suspend) and commits their offsets.spring.kafka.container.start.count and spring.kafka.container.stop.count Micrometer counters.AbstractKafkaListenerContainerFactory.setKafkaAdmin() to apply a KafkaAdmin to every container the factory creates.Existing meter tags change, so dashboards and recording rules may need an update.
ShareAckMode.EXPLICIT (ContainerProperties.setShareAutoRenewLocks(true)), ShareKafkaMessageListenerContainer.getClientInstanceIds() for KIP-714 telemetry, and RecordMessageConverter support on the ShareKafkaListenerContainerFactory.A new share consumer sample is also available.
See the What's New chapter and the release notes for more information. The 4.2.0-M1, 4.2.0-M2 and 4.2.0-RC1 release notes have the complete history.
4.1.3 and 4.0.9 contain bug fixes, CVE fixes and dependency upgrades.
Together with 4.1.1, 4.1.2, 4.0.7 and 4.0.8, they bring most of the 4.2 bug fixes to the maintenance lines, including:
CommonDelegatingErrorHandler and CommonMixedErrorHandler.InvalidPidMappingException.group.instance.id was still in use.See the release notes for 4.1.3, 4.1.2, 4.1.1, 4.0.9, 4.0.8 and 4.0.7.
These two were fixed earlier, in 4.1.1 and 4.0.7:
Thank you to the community members who contributed since 4.1.0:
@29shivam, @arimu1, @beyondwin, @BK202503, @bobby224812, @CCCLL, @cfcromn, @chuuminggg, @COBI-98, @dlwhdgus0810, @dlwldn30, @dongmin132, @GangEunzzang, @Gaurav1112, @hunseonglee, @janwaleed09, @kalayciburak, @kdelay, @kyash99252, @LindseyZ1205, @ngocnhan-tran1996, @nikita-kibitkin, @ohchanKyu, @OmarMorales71, @renechoi, @seungh0, @sharanggupta, @sofiane-benzid, @sudhanshubliz, @VadimPresident, @wldks1008, @wn1331, @wolfpeyton