Packages

o

kinesis4cats.kcl.localstack

LocalstackKCLConsumer

object LocalstackKCLConsumer

Helpers for constructing and leveraging the KPL with Localstack.

Source
LocalstackKCLConsumer.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalstackKCLConsumer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class ConfigWithResults[F[_]](kclConfig: Config[F], resultsQueue: Queue[F, CommittableRecord[F]]) extends Product with Serializable
  2. final case class DeferredWithResults[F[_]](deferred: Deferred[F, Unit], resultsQueue: Queue[F, CommittableRecord[F]]) extends Product with Serializable

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. def kclConfig[F[_]](streamName: String, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, position: InitialPositionInStreamExtended = InitialPositionInStreamExtended.newInitialPosition(
    InitialPositionInStream.TRIM_HORIZON
    )
    , processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default)
    (cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Config[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack.

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default is a random UUID

    position

    InitialPositionInStreamExtended Default is TRIM_HORIZON

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    KCLConsumer.Config

  12. def kclConfig[F[_]](config: LocalstackConfig, streamName: String, appName: String, workerId: String, position: InitialPositionInStreamExtended, processConfig: ProcessConfig)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Config[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack.

    config

    LocalstackConfig

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    position

    InitialPositionInStreamExtended

    processConfig

    KCLConsumer.ProcessConfig

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    KCLConsumer.Config

  13. def kclConfigWithResults[F[_]](streamName: String, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, position: InitialPositionInStreamExtended = InitialPositionInStreamExtended.newInitialPosition(
    InitialPositionInStream.TRIM_HORIZON
    )
    , processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default, resultsQueueSize: Int = 50)
    (cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, ConfigWithResults[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack. Also creates a results queue for the consumer to stick results into. Helpful when confirming data that has been produced to a stream.

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default to random UUID

    position

    InitialPositionInStreamExtended

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    resultsQueueSize

    Bounded size of the Queue. Default to 50.

    cb

    User-defined callback function for processing records. This will run after the records are enqueued into the results queue

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    ConfigWithResults

  14. def kclConfigWithResults[F[_]](config: LocalstackConfig, streamName: String, appName: String, workerId: String, position: InitialPositionInStreamExtended, processConfig: ProcessConfig, resultsQueueSize: Int)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, ConfigWithResults[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack. Also creates a results queue for the consumer to stick results into. Helpful when confirming data that has been produced to a stream.

    config

    LocalstackConfig

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    position

    InitialPositionInStreamExtended

    processConfig

    KCLConsumer.ProcessConfig

    resultsQueueSize

    Bounded size of the Queue

    cb

    User-defined callback function for processing records. This will run after the records are enqueued into the results queue

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    ConfigWithResults

  15. def kclConsumer[F[_]](streamName: String, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, position: InitialPositionInStreamExtended = InitialPositionInStreamExtended.newInitialPosition(
    InitialPositionInStream.TRIM_HORIZON
    )
    , processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default)
    (cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Deferred[F, Unit]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Also exposes a Deferred that will complete when the consumer has started processing records. Useful for allowing tests time for the consumer to start before processing the stream.

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default to a random UUID.

    position

    InitialPositionInStreamExtended. Default to TRIM_HORIZON

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    Deferred in a Resource, which completes when the consumer has started processing records

  16. def kclConsumer[F[_]](config: LocalstackConfig, streamName: String, appName: String, workerId: String, position: InitialPositionInStreamExtended, processConfig: ProcessConfig)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Deferred[F, Unit]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Also exposes a Deferred that will complete when the consumer has started processing records. Useful for allowing tests time for the consumer to start before processing the stream.

    config

    LocalstackConfig

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    position

    InitialPositionInStreamExtended

    processConfig

    KCLConsumer.ProcessConfig

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    Deferred in a Resource, which completes when the consumer has started processing records

  17. def kclConsumerWithResults[F[_]](streamName: String, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, position: InitialPositionInStreamExtended = InitialPositionInStreamExtended.newInitialPosition(
    InitialPositionInStream.TRIM_HORIZON
    )
    , processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default, resultsQueueSize: Int = 50)
    (cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, DeferredWithResults[F]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Exposes a Deferred that will complete when the consumer has started processing records, as well as a Queue for tracking the received records. Useful for allowing tests time for the consumer to start before processing the stream, and testing those records that have been received.

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default to a random UUID

    position

    InitialPositionInStreamExtended. Default to TRIM_HORIZON.

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    resultsQueueSize

    Bounded size of the Queue. Default to 50.

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    DeferredWithResults in a Resource, which completes when the consumer has started processing records

  18. def kclConsumerWithResults[F[_]](config: LocalstackConfig, streamName: String, appName: String, workerId: String, position: InitialPositionInStreamExtended, processConfig: ProcessConfig, resultsQueueSize: Int)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, DeferredWithResults[F]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Exposes a Deferred that will complete when the consumer has started processing records, as well as a Queue for tracking the received records. Useful for allowing tests time for the consumer to start before processing the stream, and testing those records that have been received.

    config

    LocalstackConfig

    streamName

    Name of stream to consume

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    position

    InitialPositionInStreamExtended

    processConfig

    KCLConsumer.ProcessConfig

    resultsQueueSize

    Bounded size of the Queue.

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    DeferredWithResults in a Resource, which completes when the consumer has started processing records

  19. def kclMultiConfig[F[_]](tracker: MultiStreamTracker, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Config[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack.

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default is a random UUID

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    KCLConsumer.Config

  20. def kclMultiConfig[F[_]](config: LocalstackConfig, tracker: MultiStreamTracker, appName: String, workerId: String, processConfig: ProcessConfig)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Config[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack. Meant to be used with multi-stream consumers.

    config

    LocalstackConfig

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    processConfig

    KCLConsumer.ProcessConfig

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    KCLConsumer.Config

  21. def kclMultiConfigWithResults[F[_]](tracker: MultiStreamTracker, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default, resultsQueueSize: Int = 50)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, ConfigWithResults[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack. Also creates a results queue for the consumer to stick results into. Helpful when confirming data that has been produced to a stream.

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default to random UUID

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    resultsQueueSize

    Bounded size of the Queue. Default to 50.

    cb

    User-defined callback function for processing records. This will run after the records are enqueued into the results queue

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    ConfigWithResults

  22. def kclMultiConfigWithResults[F[_]](config: LocalstackConfig, tracker: MultiStreamTracker, appName: String, workerId: String, processConfig: ProcessConfig, resultsQueueSize: Int)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, ConfigWithResults[F]]

    Creates a KCLConsumer.Config that is compliant with Localstack.

    Creates a KCLConsumer.Config that is compliant with Localstack. Also creates a results queue for the consumer to stick results into. Helpful when confirming data that has been produced to a stream. Intended to be used for testing a multi-stream consumer.

    config

    LocalstackConfig

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    processConfig

    KCLConsumer.ProcessConfig

    resultsQueueSize

    Bounded size of the Queue

    cb

    User-defined callback function for processing records. This will run after the records are enqueued into the results queue

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    ConfigWithResults

  23. def kclMultiConsumer[F[_]](tracker: MultiStreamTracker, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Deferred[F, Unit]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Also exposes a Deferred that will complete when the consumer has started processing records. Useful for allowing tests time for the consumer to start before processing the stream.

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default to a random UUID.

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    Deferred in a Resource, which completes when the consumer has started processing records

  24. def kclMultiConsumer[F[_]](config: LocalstackConfig, tracker: MultiStreamTracker, appName: String, workerId: String, processConfig: ProcessConfig)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, Deferred[F, Unit]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Also exposes a Deferred that will complete when the consumer has started processing records. Useful for allowing tests time for the consumer to start before processing the stream.

    config

    LocalstackConfig

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    processConfig

    KCLConsumer.ProcessConfig

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    Deferred in a Resource, which completes when the consumer has started processing records

  25. def kclMultiConsumerWithResults[F[_]](tracker: MultiStreamTracker, appName: String, prefix: Option[String] = None, workerId: String = Utils.randomUUIDString, processConfig: ProcessConfig = KCLConsumer.ProcessConfig.default, resultsQueueSize: Int = 50)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, DeferredWithResults[F]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Exposes a Deferred that will complete when the consumer has started processing records, as well as a Queue for tracking the received records. Useful for allowing tests time for the consumer to start before processing the stream, and testing those records that have been received.

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    prefix

    Optional prefix for parsing configuration. Default to None

    workerId

    Unique identifier for the worker. Default to a random UUID Default to TRIM_HORIZON.

    processConfig

    KCLConsumer.ProcessConfig Default is ProcessConfig.default

    resultsQueueSize

    Bounded size of the Queue. Default to 50.

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    DeferredWithResults in a Resource, which completes when the consumer has started processing records

  26. def kclMultiConsumerWithResults[F[_]](config: LocalstackConfig, tracker: MultiStreamTracker, appName: String, workerId: String, processConfig: ProcessConfig, resultsQueueSize: Int)(cb: (List[CommittableRecord[F]]) => F[Unit])(implicit F: Async[F], LE: LogEncoders): Resource[F, DeferredWithResults[F]]

    Runs a KCLConsumer that is compliant with Localstack.

    Runs a KCLConsumer that is compliant with Localstack. Exposes a Deferred that will complete when the consumer has started processing records, as well as a Queue for tracking the received records. Useful for allowing tests time for the consumer to start before processing the stream, and testing those records that have been received.

    config

    LocalstackConfig

    tracker

    kinesis4cats.kcl.multistream.MultiStreamTracker

    appName

    Application name for the consumer. Used for the dynamodb table name as well as the metrics namespace.

    workerId

    Unique identifier for the worker. Typically a UUID.

    processConfig

    KCLConsumer.ProcessConfig

    resultsQueueSize

    Bounded size of the Queue.

    cb

    User-defined callback function for processing records

    F

    Async

    LE

    RecordProcessor.LogEncoders

    returns

    DeferredWithResults in a Resource, which completes when the consumer has started processing records

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped