Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit e731cd6

Browse files
authored
Update KPL and KCL libraries (#44)
* upgraded KCL * upgrade KPL * updated readme
1 parent f766e67 commit e731cd6

File tree

8 files changed

+415
-197
lines changed

8 files changed

+415
-197
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ It's worth familiarising yourself with [Sequence numbers and Sub sequence number
3535
* [Valid Release Tag Examples:](#contributor-guide-tag-requirements-valid-release-tag-examples)
3636
* [Invalid Release Tag Examples:](#contributor-guide-tag-requirements-invalid-release-tag-examples)
3737
* [Contribution policy](#contribution-policy)
38+
* [Changelog](#changelog)
3839
* [License](#license)
3940

4041

@@ -596,6 +597,10 @@ explicitly, by submitting any copyrighted material via pull request, email, or o
596597
agree to license the material under the project's open source license and warrant that you have the
597598
legal authority to do so.
598599

600+
<a name="changelog"></a>
601+
# Changelog
602+
See the releases tab: https://github.com/WW-Digital/reactive-kinesis/releases
603+
599604
<a name="license"></a>
600605
# License
601606

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ lazy val library =
4040
"com.fasterxml.uuid" % "java-uuid-generator" % "3.1.4" % Compile)
4141

4242
val amazon = Seq(
43-
"com.amazonaws" % "amazon-kinesis-client" % "1.8.1" % Compile
43+
"com.amazonaws" % "amazon-kinesis-client" % "1.8.8" % Compile
4444
excludeAll(
4545
ExclusionRule(organization = "com.fasterxml.jackson.core"),
4646
ExclusionRule(organization = "com.fasterxml.jackson.dataformat")),
47-
"com.amazonaws" % "amazon-kinesis-producer" % "0.12.5" % Compile
47+
"com.amazonaws" % "amazon-kinesis-producer" % "0.12.8" % Compile
4848
excludeAll(
4949
ExclusionRule(organization = "com.fasterxml.jackson.core"),
5050
ExclusionRule(organization = "com.fasterxml.jackson.dataformat"))

src/main/resources/reference.conf

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,70 @@ kinesis {
652652
# Default: no timeout
653653
#timeoutInSeconds =
654654

655+
# The amount of milliseconds to wait before graceful shutdown forcefully terminates the process.
656+
# Default: 5000
657+
#shutdownGraceMillis = 5000
658+
659+
# Internally support timeouts and retries for GetRecords calls.
660+
#
661+
# If retryGetRecordsInSeconds is set
662+
# And maxGetRecordsThreadPool is set
663+
# Then getRecords will asynchronously retry internally using a CompletionService of
664+
# max size "maxGetRecordsThreadPool" with "retryGetRecordsInSeconds" between each retry.
665+
#
666+
# NOTE: this enables the AsynchronousGetRecordsRetrievalStrategy for getRecords
667+
#
668+
# Time in seconds to wait before the worker retries to get a record
669+
# Default: Optional value, default not set
670+
#retryGetRecordsInSeconds = 1
671+
#
672+
# max number of threads in the getRecords thread pool (per shard)
673+
# Default: Optional value, default not set
674+
#maxGetRecordsThreadPool = 2
675+
676+
677+
#######################
678+
# Pre-fetching config #
679+
#######################
680+
# Pre-fetching will retrieve and queue additional records from Kinesis while the
681+
# application is processing existing records.
682+
# Pre-fetching can be enabled by setting dataFetchingStrategy to PREFETCH_CACHED. Once
683+
# enabled an additional fetching thread will be started to retrieve records from Kinesis.
684+
# Retrieved records will be held in a queue until the application is ready to process them.
685+
686+
# Which data fetching strategy to use (DEFAULT, PREFETCH_CACHED)
687+
# Default: DEFAULT
688+
dataFetchingStrategy = PREFETCH_CACHED
689+
690+
#
691+
# Pre-fetching supports the following configuration values:
692+
#
693+
694+
# The maximum number of process records input that can be queued
695+
# Default: 3
696+
#maxPendingProcessRecordsInput = 3
697+
698+
# The maximum number of bytes that can be queued
699+
# Default 8388608 (8 * 1024 * 1024 / 8Mb)
700+
#maxCacheByteSize = 8388608
701+
702+
# The maximum number of records that can be queued
703+
# Default: 30000
704+
#maxRecordsCount = 30000
705+
706+
# The amount of time to wait between calls to Kinesis
707+
# Default: 1500
708+
#idleMillisBetweenCalls = 1500
709+
710+
##############################
711+
# End of Pre-fetching config #
712+
##############################
713+
714+
715+
# Milliseconds after which the logger will log a warning message for the long running task
716+
# Default: not set
717+
#logWarningForTaskAfterMillis = 100
718+
655719
}
656720
}
657721
}

src/main/scala/com/weightwatchers/reactive/kinesis/producer/ProducerConf.scala

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,6 @@ object ProducerConf {
9696
KinesisProducerConfiguration.fromProperties(kplProps)
9797
credentialsProvider.foreach(kplLibConfiguration.setCredentialsProvider)
9898

99-
//TODO, this should be part of the KPL. The KCL would handle enums and ints and let us use props directly.
100-
//TODO can be removed once this is merged: https://github.com/awslabs/amazon-kinesis-producer/pull/134
101-
if (kplConfig.hasPath("ThreadingModel")) {
102-
kplLibConfiguration.setThreadingModel(
103-
ThreadingModel.valueOf(kplConfig.getString("ThreadingModel"))
104-
)
105-
}
106-
if (kplConfig.hasPath("ThreadPoolSize")) {
107-
kplLibConfiguration.setThreadPoolSize(kplConfig.getInt("ThreadPoolSize"))
108-
}
109-
11099
kplLibConfiguration
111100
}
112101

0 commit comments

Comments
 (0)