Packages

abstract class Producer[F[_], PutReq, PutRes] extends AnyRef

An interface that gives users the ability to efficiently batch and produce records. A producer has a ShardMapCache, and uses it to predict the shard that a record will be produced to. Knowing this, we can batch records against both shard and stream-level limits for requests. There should be 1 instance of a Producer per Kinesis stream (as a ShardMapCache will only consider a single stream)

PutReq

The class that represents a batch put request for the underlying client

PutRes

The class that represents a batch put response for the underlying client

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

Abstract Value Members

  1. abstract def asPutRequest(records: NonEmptyList[Record]): PutReq

    Transforms a a NonEmptyList of Records into the underlying put request

    Transforms a a NonEmptyList of Records into the underlying put request

    records

    a NonEmptyList of Records

    returns

    the underlying put request

    Attributes
    protected
  2. abstract def config: Config[F]
  3. abstract def failedRecords(records: NonEmptyList[Record], resp: PutRes): Option[NonEmptyList[FailedRecord]]

    Matches the a NonEmptyList of Records with the underlying response records and returns any errored records.

    Matches the a NonEmptyList of Records with the underlying response records and returns any errored records. Useful for retrying any records that failed

    records

    a NonEmptyList of Records

    resp

    the underlying put response

    returns

    A list of Producer.FailedRecord

    Attributes
    protected
  4. abstract def logger: StructuredLogger[F]
  5. abstract def putImpl(req: PutReq): F[PutRes]

    Underlying implementation for putting a batch request to Kinesis

    Underlying implementation for putting a batch request to Kinesis

    req

    the underlying put request

    returns

    the underlying put response

    Attributes
    protected
  6. abstract def shardMapCache: ShardMapCache[F]

Concrete 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( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. def put(records: NonEmptyList[Record]): F[Res[PutRes]]

    This function is responsible for:

    This function is responsible for:

    • Predicting the shard that a record will land on
    • Batching records against Kinesis limits for shards / streams
    • Putting batches to Kinesis
    • Retrying failures per the configured RetryPolicy
    records

    a NonEmptyList of Records

    returns

    Ior with the following:

    • left: a Producer.Error, which represents records that were too large to be put on kinesis as well as records that were not produced successfully in the batch request.
    • right: a NonEmptyList of the underlying put responses
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped