Skip to content

Instantly share code, notes, and snippets.

@mkurian
Last active November 10, 2019 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkurian/78c9d9fd53c56cbf732c91a16bfadc9d to your computer and use it in GitHub Desktop.
Save mkurian/78c9d9fd53c56cbf732c91a16bfadc9d to your computer and use it in GitHub Desktop.
fun kclConfig(streamConfig: StreamConfigProperties): KinesisClientLibConfiguration {
return KinesisClientLibConfiguration(streamConfig.applicationName,
streamConfig.streamArn, awsAuth.credentialsProvider(), streamConfig.workerId)
.withMaxRecords(streamConfig.batchSize)
.withIdleTimeBetweenReadsInMillis(streamConfig.pollingFrequency)
.withInitialPositionInStream(InitialPositionInStream.valueOf(streamConfig.streamPosition))
.withRegionName(streamConfig.region)
.withDynamoDBEndpoint(streamConfig.dynamoDBEndpoint)
.withCallProcessRecordsEvenForEmptyRecordList(true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment