ProducerRecord

fs2.kafka.ProducerRecord
See theProducerRecord companion object
sealed abstract class ProducerRecord[+K, +V]

ProducerRecord represents a record which can be produced to Kafka. At the very least, this includes a key of type K, a value of type V, and to which topic the record should be produced. The partition, timestamp, and headers can be set by using the withPartition, withTimestamp, and withHeaders functions, respectively.

To create a new instance, use ProducerRecord#apply.

Attributes

Companion:
object
Source:
ProducerRecord.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

The record headers.

The record headers.

Attributes

Source:
ProducerRecord.scala
def key: K

The record key.

The record key.

Attributes

Source:
ProducerRecord.scala

The partition to which the record should be produced.

The partition to which the record should be produced.

Attributes

Source:
ProducerRecord.scala

The timestamp for when the record was produced.

The timestamp for when the record was produced.

Attributes

Source:
ProducerRecord.scala

The topic to which the record should be produced.

The topic to which the record should be produced.

Attributes

Source:
ProducerRecord.scala
def value: V

The record value.

The record value.

Attributes

Source:
ProducerRecord.scala
def withHeaders(headers: Headers): ProducerRecord[K, V]

Creates a new ProducerRecord instance with the specified headers as the headers for the record.

Creates a new ProducerRecord instance with the specified headers as the headers for the record.

Attributes

Source:
ProducerRecord.scala
def withPartition(partition: Int): ProducerRecord[K, V]

Creates a new ProducerRecord instance with the specified partition as the partition to which the record should be produced.

Creates a new ProducerRecord instance with the specified partition as the partition to which the record should be produced.

Attributes

Source:
ProducerRecord.scala
def withTimestamp(timestamp: Long): ProducerRecord[K, V]

Creates a new ProducerRecord instance with the specified timestamp as the timestamp for when the record was produced.

Creates a new ProducerRecord instance with the specified timestamp as the timestamp for when the record was produced.

Attributes

Source:
ProducerRecord.scala