This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
Reworked Producer Configuration, added ThreadingModel support
PR: #30
See below for the new producer instantiation, you now use ProducerConf
for the Scala implementation too.
New method:
val kinesisConfig: Config = ConfigFactory.load().getConfig("kinesis")
val kpl = KinesisProducer(ProducerConf(kinesisConfig, "some-producer"))
Note that the config is the kinesis
block, not the kpl
block as before.
Old method:
val kinesisConfig: Config = ConfigFactory.load().getConfig("kinesis")
val producerConfig: Config = kinesisConfig.getConfig("some-producer")
val streamName: String = producerConfig.getString("stream-name")
val kpl = KinesisProducerKPL(kinesisConfig.getConfig("kpl"), streamName)
- Small breaking change Removed the trait in the Producer and renamed KinesisProducerKPL to KinesisProducer
- Added
ThreadPoolSize
andThreadingModel
KPL properties, see awslabs/amazon-kinesis-producer#100 - Refactored how the properties are loaded to share commonality between the actor and Scala
implementations. This simplifies the Scala implementation and makes it more robust. It also allows more control over the underlying KPL properties should someone want to not use the Typesafe config approach.