Metrics
KafkaProducer.Metrics extends KafkaProducer to provide access to the underlying producer metrics.
Value members
Abstract methods
Inherited methods
Produces the specified ProducerRecords in two steps: the first effect puts the records in the buffer of the producer, and the second effect waits for the records to send.
Produces the specified ProducerRecords in two steps: the first effect puts the records in the buffer of the producer, and the second effect waits for the records to send.
It's possible to flatten
the result from this function to
have an effect which both sends the records and waits for
them to finish sending.
Waiting for individual records to send can substantially limit performance. In some cases, this is necessary, and so we might want to consider the following alternatives.
- Wait for the produced records in batches, improving
the rate at which records are produced, but loosing
the guarantee where
produce >> otherAction
meansotherAction
executes after the record has been sent.<br> - Run several
produce.flatten >> otherAction
concurrently, improving the rate at which records are produced, and still haveotherAction
execute after records have been sent, but losing the order of produced records.
- Inherited from
- KafkaProducer