Apply an effectful function to each record in a stream
Apply an effectful function to each record in a stream
This is the easiest way to consume Kinesis records from a stream, while benefiting from all of Consumer's features like parallel streaming, checkpointing and resharding.
Simply provide an asynchronous function that is applied to each record and the rest is taken care of. The function will be called for every record in the stream, with a parallelism.
Type parameters
T
Type of record values
Value parameters
checkpointBatchSize
Maximum number of records before checkpointing
checkpointDuration
Maximum interval before checkpointing
recordProcessor
A function for processing a Record[T]
Attributes
Returns
A cancelable future that completes with Unit when record processing is stopped or fails when the consumer stream fails