Header

sealed abstract class Header extends Header

Header represents a String key and Array[Byte] value which can be included as part of Headers when creating a ProducerRecord. Headers are included together with a record once produced, and can be used by consumers.

To create a new Header, use Header#apply.

Header represents a String key and Array[Byte] value which can be included as part of Headers when creating a ProducerRecord. Headers are included together with a record once produced, and can be used by consumers.

To create a new Header, use Header#apply.

Companion
object
trait Header
class Object
trait Matchable
class Any

Value members

Abstract methods

override def key: String

The header key.

The header key.

Definition Classes
Header
override def value: Array[Byte]

The serialized header value.

The serialized header value.

Definition Classes
Header

Concrete methods

final def as[A](deserializer: HeaderDeserializer[A]): A

Deserializes the value to the specified type.

Deserializes the value to the specified type.

final def attemptAs[A](deserializer: Attempt[A]): Either[Throwable, A]

Attempts to deserialize the value to the specified type.

Attempts to deserialize the value to the specified type.