sealed abstract class ProducerRecord[+K, +V] extends AnyRef
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.
- Source
- ProducerRecord.scala
- Alphabetic
- By Inheritance
- ProducerRecord
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def headers: Headers
The record headers.
- abstract def key: K
The record key.
- abstract def partition: Option[Int]
The partition to which the record should be produced.
- abstract def timestamp: Option[Long]
The timestamp for when the record was produced.
- abstract def topic: String
The topic to which the record should be produced.
- abstract def value: V
The record value.
- abstract def withHeaders(headers: Headers): ProducerRecord[K, V]
Creates a new ProducerRecord instance with the specified headers as the headers for the record.
- abstract 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.
- abstract 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.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()