Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreOn behalf of the team and everyone who contributed, we are pleased to announce that Spring for Apache Kafka 4.1.0, 4.0.6, and 3.3.16 have been released.
We extend our gratitude to all contributors who made these releases possible.
This is the first GA release of the 4.1.x generation.
If you are coming from 4.0.x, the What's New in 4.1 Since 4.0 chapter of the reference manual is the best starting point for a full picture of the new features and changes.
The feature set was built up progressively across the milestones and release candidate.
For the detailed narrative on each phase, refer to the prior release blogs in the 4.1.x line:
The GA release concentrates on stabilization, with a focused set of bug fixes on top of RC1.
This release fixes the following CVEs:
BatchListenerFailedException silently commits offsets (#4436): Fixed a correctness issue where BatchListenerFailedException could cause offsets for unprocessed records in a BatchMessageListener to be committed silently instead of being retried.
DefaultAfterRollbackProcessor seek fix (#4439): DefaultAfterRollbackProcessor for batch listeners consuming ConsumerRecords now correctly seeks the consumer on rollback, preventing records from being silently skipped.
setBackOffFunction for batch processing (#4455): The setBackOffFunction method now applies uniformly to batch listeners as well as record listeners.
ackMode=COUNT_TIME timing fix (#4444): KafkaMessageListenerContainer now correctly evaluates the elapsed time component when ackMode is COUNT_TIME, ensuring acknowledgments are not delayed indefinitely.
Non-string properties in DefaultConsumerFactory (#4384): Resolved inconsistent handling of non-string values in the Properties argument passed to DefaultConsumerFactory::createKafkaConsumer.
Value serializer classloader handling (#4442): Fixed differing behavior for value serializer type mappings when the same configuration was used across different classloaders.
NPE in StreamsBuilderFactoryBean (#4434): Resolved a NullPointerException that occurred when no explicit properties were defined for StreamsBuilderFactoryBean.
KafkaStreamsDeadLetterDestinationResolver (#4430): Fixed incorrect key, value, and headers being passed to KafkaStreamsDeadLetterDestinationResolver during error routing.
Kafka client has been updated to 4.2.1, along with maintenance bumps for Jackson, Kotlin, and slf4j.
4.0.6 backports the DefaultConsumerFactory non-string properties fix, the DefaultAfterRollbackProcessor seek issue, the StreamsBuilderFactoryBean NPE, and the value serializer classloader fix.
It also includes a documentation clarification that Spring Boot 4 projects require the spring-boot-starter-kafka dependency explicitly, along with a slf4j bump.
3.3.16 backports the DefaultConsumerFactory non-string properties fix, the StreamsBuilderFactoryBean NPE, and the value serializer classloader fix, together with Jackson maintenance updates.
More details along with any dependency updates and other changes can be found in the release notes.
Spring Kafka 4.1.0 will be integrated into Spring Boot 4.1.0.
Spring Kafka 4.0.6 will be integrated into Spring Boot 4.0.7.
Spring Kafka 3.3.16 will be integrated into Spring Boot 3.5.15.
Feedback and issue reports are welcome on GitHub.