com.gilt.gfc.kinesis.consumer

RawKinesisStreamConsumer

case class RawKinesisStreamConsumer(streamName: String, config: KinesisConsumerConfig, executorService: ExecutorService = Executors.newCachedThreadPool())(processBatch: (Seq[Record], Checkpoint) ⇒ Unit) extends Loggable with Product with Serializable

A Consumer of data from a Kinesis Stream.

If multiple shards exist, the processBatch function here will be executed from different threads, possibly concurrently.

streamName

The name of the Kinesis stream to consume

config

The configuration

executorService

to use for processing records - this is passed to, and used by, the underlying Java Amazon library. Defaults to Executors.newCachedThreadPool()

processBatch

A function that is called for each "batch" of records received from the kinesis stream. This function may be called from different threads (for different shards), and possibly even concurrently. Note this function should complete in less time than the configured KinesisConsumerConfig.leaseFailoverTime as otherwise the lease could expire while processing is proceeding.

Linear Supertypes
Serializable, Serializable, Product, Equals, Loggable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RawKinesisStreamConsumer
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Loggable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RawKinesisStreamConsumer(streamName: String, config: KinesisConsumerConfig, executorService: ExecutorService = Executors.newCachedThreadPool())(processBatch: (Seq[Record], Checkpoint) ⇒ Unit)

    streamName

    The name of the Kinesis stream to consume

    config

    The configuration

    executorService

    to use for processing records - this is passed to, and used by, the underlying Java Amazon library. Defaults to Executors.newCachedThreadPool()

    processBatch

    A function that is called for each "batch" of records received from the kinesis stream. This function may be called from different threads (for different shards), and possibly even concurrently. Note this function should complete in less time than the configured KinesisConsumerConfig.leaseFailoverTime as otherwise the lease could expire while processing is proceeding.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val config: KinesisConsumerConfig

    The configuration

  7. def debug(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  8. def debug(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def error(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  11. def error(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  12. def error(ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  13. val executorService: ExecutorService

    to use for processing records - this is passed to, and used by, the underlying Java Amazon library.

    to use for processing records - this is passed to, and used by, the underlying Java Amazon library. Defaults to Executors.newCachedThreadPool()

  14. def fatal(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  15. def fatal(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  16. def fatal(ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def info(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  20. def info(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def onShardShutdown(func: (Checkpoint, ShardId) ⇒ Unit): Unit

    Register a function to be called when a shard is being terminated.

    Register a function to be called when a shard is being terminated.

    This can be useful to allow applications decide their own checkpoint workflow, rather than checkpointing every "batch".

    If no function is registered here, then an automatic checkpoint is issued on shard termination.

    Only a single registration is allowed.

    func

    A function that will be called on shard termination - this is passed a Checkpoint and the ID of the shard being terminated.

  26. def shutdown(): Unit

    Initiate the shutdown of processing the stream.

  27. def start(): Unit

    Start reading data from the stream.

  28. val streamName: String

    The name of the Kinesis stream to consume

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def trace(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  31. def trace(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  32. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def warn(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  36. def warn(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Loggable

Inherited from AnyRef

Inherited from Any

Ungrouped