Exmld.KinesisWorker.add_record

You're seeing just the function add_record, go back to Exmld.KinesisWorker module for more information.
Link to this function

add_record(state, record, token)

View Source

Submit a new Kinesis record to the downstream pipeline for processing.

A new Kinesis record is available for processing, and erlmld_batch_processor is instructing us to add it to the current batch. Since we really have no notion of a batch, we immediately choose a downstream stage and notify it of a new Exmld.KinesisWorker.Datum containing the record and make a note of it being in-flight. That call will block until a further-downstream consumer receives the record as a flow event.

The result of that call will be an updated list of item dispositions. Unless configured to skip records which failed to be processed, we crash if any failed. Otherwise we update the set of done/pending items and return an updated state.