Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreDear Spring community,
We are pleased to announce that the Spring Integration Kafka Support 1.1 GA is now available. Use the Release Repository with Maven or Gradle
compile "org.springframework.integration:spring-integration-kafka:1.1.1.RELEASE"
or download a distribution archive, to give it a spin.
The main reason of such a quick next point release just after 1.0 GA is to address a number of critical fixes for the upcoming Spring XD 1.1.1
and 1.2
releases. In addition, this release provides performance improvements around message generation streaming scenarios, which required an upgrade to Spring Integration 4.1
, which is the minimum for Spring XD also.
One more important feature, which has been introduced with this release, is manual acknowledgment, where a message's offset
can be committed later on demand.
For this purpose, Spring Integration Kafka introduces the Acknowledgment
interface. When KafkaMessageDrivenChannelAdapter#autoCommitOffset
is set to false
, a KafkaHeaders.ACKNOWLEDGMENT
header is added to the message, containing an Acknowledgment
object. Having that message header you always can decide to acknowledge()
the Kafka message or not in the downstream flow.
If you are using KafkaMessageListenerContainer
directly, you can now register an AcknowledgingMessageListener
:
public interface AcknowledgingMessageListener {
void onMessage(KafkaMessage message, Acknowledgment acknowledgment);
}
When doing so, automatic offset updates are disabled, and you can use the acknowledge()
method of the Acknowledgment
argument to trigger an offset update.
Our plans are to work on 1.2
release. It will be a critical upgrade to Kafka 0.8.2, possibly non-backwards compatible. Plus we are going to expose more configurable options for retry support within Kafka Adapters. And much more!
Project Page | JIRA | Issues | [Contributions]
(https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.md) | StackOverflow (spring-integration
tag)