Cross-Account Kinesis Consumer Using Spring Cloud 3x Stream, Function & AWS KCL
4 min readMay 14, 2021
There are two ways you can implement AWS Kinesis consumer in Java Spring Cloud Stream, one using AWS SDK and the second using KCL (Kinesis Client Library). Maybe this short & very informative excerpt from AWS will help you quickly choose KCL over SDK for the majority of the use cases like it helped me.
KCL helps you consume and process data from a Kinesis data stream by taking care of many of the complex tasks associated with distributed computing. These include load balancing across multiple consumer application instances, responding to consumer application instance failures, checkpointing processed records, and reacting to resharding. The KCL takes care of all of these subtasks so that you can focus your efforts on writing your custom record-processing logic.The KCL is different from the Kinesis Data Streams APIs that are available in the AWS SDKs. The Kinesis Data Streams APIs help you manage many aspects of Kinesis Data Streams, including creating streams, resharding, and putting and getting records. The KCL provides a layer of abstraction around all these subtasks, specifically so that you can focus on your consumer application’s custom data processing logicReference…