ProducerMessage represents zero or more ProducerRecords,
together with an arbitrary passthrough value, all of which can
be used with KafkaProducer. ProducerMessages can be
created using one of the following options.
- ProducerMessage#single to produce exactly one record and
then emit a ProducerResult with the result and specified
passthrough value.
- ProducerMessage#multiple to produce zero or more records
and then emit a ProducerResult with the results and
specified passthrough value.
- ProducerMessage#passthrough to produce exactly zero
records, only emitting a ProducerResult with the
specified passthrough value.
ProducerMessage represents zero or more
ProducerRecord
s, together with an arbitrary passthrough value, all of which can be used with KafkaProducer. ProducerMessages can be created using one of the following options.-
ProducerMessage#single
to produce exactly one record and then emit a ProducerResult with the result and specified passthrough value.-
ProducerMessage#multiple
to produce zero or more records and then emit a ProducerResult with the results and specified passthrough value.-
ProducerMessage#passthrough
to produce exactly zero records, only emitting a ProducerResult with the specified passthrough value.The passthrough and records can be retrieved from an existing ProducerMessage instance.
For a ProducerMessage to be usable by KafkaProducer, it needs a
Traverse
instance. This requirement is captured in ProducerMessage via traverse.