Amazon Kinesis Stream with AWS SDK for Java: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
=Dependency= | =Dependency= | ||
<font color=darkgray>TODO: Gradle dependencies for ASW SDK for Java 2 look differently: https://kb.novaordis.com/index.php/AWS_SDK_for_Java_Version_2#Gradle_Project | <font color=darkgray>TODO: Gradle dependencies for ASW SDK for Java 2 look differently: https://kb.novaordis.com/index.php/AWS_SDK_for_Java_Version_2#Gradle_Project | ||
TODO: Gradle dependencies for ASW SDK for Java 1 look differently: https://kb.novaordis.com/index.php/AWS_SDK_for_Java_Version_1#Gradle_Project</font> | |||
<syntaxhighlight lang='groovy'> | <syntaxhighlight lang='groovy'> |
Revision as of 05:41, 3 October 2021
External
- https://docs.aws.amazon.com/streams/latest/dev/getting-started.html
- https://docs.aws.amazon.com/streams/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecord
Internal
Overview
Relevant Amazon Kinesis Stream concepts: stream name, partition key, sequence number.
Dependency
TODO: Gradle dependencies for ASW SDK for Java 2 look differently: https://kb.novaordis.com/index.php/AWS_SDK_for_Java_Version_2#Gradle_Project
TODO: Gradle dependencies for ASW SDK for Java 1 look differently: https://kb.novaordis.com/index.php/AWS_SDK_for_Java_Version_1#Gradle_Project
dependencies {
implementation 'com.amazonaws:aws-java-sdk-kinesis:1.11.471'
}
Developing Stream Consumers
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.