This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Add Akka Stream Source, Upgrade Libraries
Changes
Consumer
- Update KCL to 1.8.8 (#44)
- Support timeouts and retries for
getRecords
calls.- Applications can now use an async retry for
getRecords
calls to Kinesis. In addition to setting theretryGetRecordsInSeconds
timeout, the application must also provide amaxGetRecordsThreadPool
size for concurrent requests.
- Applications can now use an async retry for
- Support configuring the graceful shutdown timeout for MultiLang Clients using
shutdownGraceMillis
. This adds support for setting the timeout that the Java process will wait for the MutliLang client to complete graceful shutdown. - Add Record pre-fetching
- This will retrieve and queue additional records from Kinesis while the application is processing existing records.
- Prefetching can be enabled by setting
dataFetchingStrategy
toPREFETCH_CACHED
. Once enabled an additional fetching thread will be started to retrieve records from Kinesis. Retrieved records will be held in a queue until the application is ready to process them. - Logging of long running tasks can be enabled by setting the
logWarningForTaskAfterMillis
configuration property
- Support timeouts and retries for
- Add an Akka Streams
Source
that can be used with streams. It is possible to create aSource
from aConsumerConf
or directly from the consumer name that is defined in the configuration. Every message that is emitted to the stream is of typeCommitableEvent[ConsumerEvent]
and has to be committed explicitly downstream with a call toevent.commit()
. It is possible to map to a different type ofCommittableEvent
via themap
andmapAsync
functionality. AKinesisConsumer
is used internally for theKinesis.source
. All rules described for the KinesisConsumer also apply for the streamSource
. (#39) - Update
ConsumerEvent
to use ByteBuffer instead of String. #41 - Fix issue where ConsumerWorker with related CheckpointWorker wasn't stopped on lease loss. In case of a lost lease, KCL now calls the shutdown method of the record processor. (#40)
Producer
- Update KPL to 0.12.8 (#44)
Migration guide
ConsumerEvent
now returns a ByteBuffer
instead of a String
. Use payloadAsString
to maintain previous functionality.
Massive thanks to @aquamatthias for the contributions