Produces the ProducerRecord
s in the specified ProducerMessage
in two steps: the first effect puts the records in the buffer of the
producer, and the second effect waits for the records to have been
sent.
Produces the ProducerRecord
s in the specified ProducerMessage
in two steps: the first effect puts the records in the buffer of the
producer, and the second effect waits for the records to have been
sent. Note that it is very slow to wait for individual records to
complete sending, but if you're sure that's what you want, then
simply flatten
the result from this function.
If you're only interested in the passthrough value, and not the whole
ProducerResult, you can instead use producePassthrough which
only keeps the passthrough value in the output.
Like produce but only keeps the passthrough value of the ProducerResult rather than the whole ProducerResult.
KafkaProducer represents a producer of Kafka messages, with the ability to produce
ProducerRecord
s using produce. Records are wrapped in ProducerMessage which allow an arbitrary value, that is a passthrough, to be included in the result. Most often this is used for keeping the CommittableOffsets, in order to commit offsets, but any value can be used as passthrough value.