Last active
November 10, 2019 20:13
-
-
Save mkurian/78c9d9fd53c56cbf732c91a16bfadc9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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