You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#72
* Document Kinesis Channel Adapters
* Fix some inconsistency in the `KinesisMessageHandler`
* Add integration test against `KinesisLocalRunning` `@Rule`
* Document testing against Kinesalite
Copy file name to clipboardExpand all lines: README.md
+111Lines changed: 111 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -504,6 +504,114 @@ The implementation is based on a simple table with `KEY` and `VALUE` attributes,
504
504
By default the `SpringIntegrationMetadataStore` table is used and it is created during `DynamoDbMetaDataStore` initialization if that doesn't exist yet.
505
505
The `DynamoDbMetaDataStore` can be used for the `KinesisMessageDrivenChannelAdapter` as a cloud-based `cehckpointStore`.
506
506
507
+
For testing application with the `DynamoDbMetaDataStore` you can use [Dynalite][] NPM module.
508
+
What you need in your application is to configure DynamoDB client properly:
Where you should specify the port on which you have ran the Dynalite service.
525
+
Also you can use for you testing purpose a copy of `org.springframework.integration.aws.DynamoDbLocalRunning` in the `/test` directory of this project.
526
+
527
+
## AmazonKinesis
528
+
529
+
AmazonKinesis is a platform for streaming data on AWS, making it easy to load and analyze streaming data, and also providing the ability for you to build custom streaming data applications for specialized needs.
530
+
TheSpringIntegration solution is fully based on the Standard `aws-java-sdk-kinesis` and doesn't use [Kinesis Client Library][] and isn't compatible with it.
531
+
532
+
### InboundChannelAdapter
533
+
534
+
The `KinesisMessageDrivenChannelAdapter` is an extension of the `MessageProducerSupport` - event-driver channel adapter.
535
+
536
+
See `KinesisMessageDrivenChannelAdapter` JavaDocs and its setters for more information how to use and how to configure it in the application forKinesis streams ingestion.
This channel adapter can be configured with the `DynamoDbMetaDataStore` mentioned above to track sequence checkpoints for shards in the cloud environment when we have several instances of our Kinesis application.
555
+
Bydefaultthis adapter uses `DeserializingConverter` to convert `byte[]` from the `Record` data.
556
+
Can be specified as `null` with meaning no conversion and the target `Message` is sent with the `byte[]` payload.
557
+
558
+
The consumer group is included to the metadata store `key`.
559
+
When records are consumed, they are filtered by the last stored `lastCheckpoint` under the key as `[CONSUMER_GROUP]:[STREAM]:[SHARD_ID]`.
560
+
561
+
### OutboundChannelAdapter
562
+
563
+
The `KinesisMessageHandler` is a `AbstractMessageHandler` to perform put record to the Kinesis stream.
564
+
The stream, partition key (or explicit hash key) and sequence number can be determined against request message via evaluation provided expressions or can be specified statically.
565
+
They also can specified as `AwsHeaders.STREAM`, `AwsHeaders.PARTITION_KEY` and `AwsHeaders.SEQUENCE_NUMBER` respectively.
566
+
567
+
The `payload` of request message can be:
568
+
569
+
- `PutRecordsRequest` to perform `AmazonKinesisAsync.putRecordsAsync`
570
+
- `PutRecordRequest` to perform `AmazonKinesisAsync.putRecordAsync`
571
+
- `ByteBuffer` to represent a data of the `PutRecordRequest`
572
+
- `byte[]` which is wrapped to the `ByteBuffer`
573
+
- any other type which is converted to the `byte[]` by the provided `Converter`; the `SerializingConverter` is used by default.
0 commit comments