Amazon Kinesis Stream with AWS SDK for Java: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 22: Line 22:


{{External|https://docs.aws.amazon.com/streams/latest/dev/developing-consumers-with-sdk.html}}
{{External|https://docs.aws.amazon.com/streams/latest/dev/developing-consumers-with-sdk.html}}
Kinesis consumers developed with AWS SDK for Java use a pull model, where the client polls the stream. [[Amazon_Kinesis_Stream_with_Kinesis_Client_Library#Overview|Kinesis Client Library (KCL)]] on the other hand, uses a push model, which is more efficient. In addition, KCL provides failover, recovery and load balancing functionality.


=<span id='Playground_Example'></span><span id='Playground_Examples'></span>Developing Stream Producers=
=<span id='Playground_Example'></span><span id='Playground_Examples'></span>Developing Stream Producers=


{{External|[https://github.com/ovidiuf/playground/tree/master/amazon/kinesis/streams/01-put-record Playground Kinesis Stream - Put Record]}}
{{External|[https://github.com/ovidiuf/playground/tree/master/amazon/kinesis/streams/01-put-record Playground Kinesis Stream - Put Record]}}

Revision as of 19:39, 20 December 2018

External

Internal

Overview

Relevant Amazon Kinesis Stream concepts: stream name, partition key, sequence number.

Dependency

dependencies {
    implementation 'com.amazonaws:aws-java-sdk-kinesis:1.11.471'
}

Developing Stream Consumers

https://docs.aws.amazon.com/streams/latest/dev/developing-consumers-with-sdk.html

Kinesis consumers developed with AWS SDK for Java use a pull model, where the client polls the stream. Kinesis Client Library (KCL) on the other hand, uses a push model, which is more efficient. In addition, KCL provides failover, recovery and load balancing functionality.

Developing Stream Producers

Playground Kinesis Stream - Put Record