mikemintz / gfc-aws-kinesis

Scala wrapper around AWS Kinesis Client Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gfc-aws-kinesis Join the chat at https://gitter.im/gilt/gfc

Scala wrapper around AWS Kinesis Client Library. Part of the Gilt Foundation Classes.

Getting gfc-aws-kinesis

The latest version is 0.10.2, which is cross-built against Scala 2.11.x and 2.12.x.

SBT dependency:

libraryDependencies += "com.gilt" %% "gfc-aws-kinesis" % "0.10.2"

SBT Akka stream dependency:

libraryDependencies += "com.gilt" %% "gfc-aws-kinesis-akka" % "0.10.2"

Basic usage

Consume events:

  implicit object ARecordReader extends KinesisRecordReader[A]{
    override def apply(r: Record) : A = {
     // parse A
    }
  }

  val config = DefaultKCLConfiguration("consumer-name", "kinesis-stream-name")

  KCLWorkerRunner(config).runAsyncSingleRecordProcessor[A](1 minute) { a: A =>
     // .. do something with A
  }

About

Scala wrapper around AWS Kinesis Client Library

License:Apache License 2.0


Languages

Language:Scala 100.0%