object KinesisFlow
- Source
- KinesisFlow.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- KinesisFlow
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def apply(streamName: String, settings: KinesisFlowSettings = KinesisFlowSettings.Defaults)(implicit kinesisClient: KinesisAsyncClient): Flow[PutRecordsRequestEntry, PutRecordsResultEntry, NotUsed]
- def batchWritingFlow[S, T](streamName: String, handleBatch: (Iterable[(PutRecordsRequestEntry, T)]) => (Try[PutRecordsResponse]) => Try[Iterable[(S, T)]], settings: KinesisFlowSettings)(implicit kinesisClient: KinesisAsyncClient): Flow[Iterable[(PutRecordsRequestEntry, T)], (S, T), NotUsed]
- def batchingFlow[T](settings: KinesisFlowSettings): Flow[(PutRecordsRequestEntry, T), Iterable[(PutRecordsRequestEntry, T)], NotUsed]
- def byPartitionAndBytes(streamName: String, settings: KinesisFlowSettings = KinesisFlowSettings.Defaults)(implicit kinesisClient: KinesisAsyncClient): Flow[(String, ByteString), PutRecordsResultEntry, NotUsed]
- def byPartitionAndData(streamName: String, settings: KinesisFlowSettings = KinesisFlowSettings.Defaults)(implicit kinesisClient: KinesisAsyncClient): Flow[(String, ByteBuffer), PutRecordsResultEntry, NotUsed]
- def handlePutRecordsSuccess[T](entries: Iterable[(PutRecordsRequestEntry, T)])(result: PutRecordsResponse): List[(PutRecordsResultEntry, T)]
- def withContext[T](streamName: String, settings: KinesisFlowSettings = KinesisFlowSettings.Defaults)(implicit kinesisClient: KinesisAsyncClient): FlowWithContext[PutRecordsRequestEntry, T, PutRecordsResultEntry, T, NotUsed]
Creates default implementation of
KinesisFlow
that takes inPutRecordsRequestEntry
with context and emitsPutRecordsResultEntry
with context.Creates default implementation of
KinesisFlow
that takes inPutRecordsRequestEntry
with context and emitsPutRecordsResultEntry
with context.To note is that the flow first does batching according to the
KinesisFlowSettings
provided and then writes the data in batches via theKinesisAsyncClient
. On any error from the client, the flow will fail.If it is necessary to have special handling for batching or of errors and successful results the methods @see KinesisFlow.batchingFlow & @see KinesisFlow.batchWritingFlow can be used and combined in other ways than the default in this method.