Spring Integration for AWS 2.0.0.M2 and Spring Cloud Stream Kinesis Binder 1.0.0.M2
Dear Spring Community!
It’s my pleasure to announce Milestone releases for Spring projects supporting Amazon Web Services: Spring Integration for AWS 2.0.0.M2
and Spring Cloud Stream Binder for AWS Kinesis 1.0.0.M2
.
Both milestones are available in the Spring Milestone repository and they can be consumed as maven dependencies:
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-aws</artifactId>
<version>2.0.0.M2</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-kinesis</artifactId>
<version>1.0.0.M2</version>
</dependency>
Where the first one is not needed to be includes when the second one is in use. The AWS Kinesis and AWS DynamoDB Java SDK dependencies are included transitively for AWS Kinesis Binder as well.
These Milestones are good effort of the team and some third-party contributors after valuable feedback from the community via StackOverflow questions, Gitter chats, bug reports and feature request. So, thank you everyone involved!
Here are changes since the previously announced Milestone 1:
-
The
KinesisMessageDrivenChannelAdapter
has been improved for fault tolerance when intermittent network errors happen in the AWS Client. -
The Kinesis
Checkpointer
has been improved to be based on theConcurrentMetadataStore
for better concurrent interactions, especially in cluster environment - consumer groups. -
A headers mapping mechanism has been implemented for the
SqsMessageHandler
andSnsMessageHandler
- theSqsHeaderMapper
andSnsHeaderMapper
as out-of-the-box implementations, respectively. -
Since AWS Kinesis doesn’t provide any headers notations, we implemented workaround via embedding headers into the Kinesis
Record
body. For this purpose theKinesisMessageHandler
andKinesisMessageDrivenChannelAdapter
should be configured with theOutboundMessageMapper
andInboundMessageMapper
, respectively. As a good choice an out-of-the-box Spring IntegrationEmbeddedJsonHeadersMessageMapper
can be used on both side to carry any desired message headers over AWS Kinesis. -
The
KinesisMessageDrivenChannelAdapter
has also been supplied with the logic to convert records whenListenerMode.batch
is used. -
The
KinesisMessageChannelBinder
has been updated according the latest changes and fixes in the Spring Cloud Stream and Spring Integration AWS. -
Also a new
rawRecords
listener mode has been introduced. By default the Kinesis Binder is configured forrecord
mode where the message to emit contains payload asbyte[]
for the downstream conversion by the Spring Cloud Stream. Thebatch
mode now produces aList<byte[]>
and this newrawRecords
mode produces a message with a payload asList<Record>
- and all the conversion logic to business model is up to end-user in the target@StreamListener
method.
As usual any feedback, feature ideas, critics, bug reports and questions are welcome via appropriate communication channels!