← ZIO Kafka docs

Deserializer

zio.kafka.serde.Deserializer
See theDeserializer companion trait
object Deserializer

Attributes

Companion
trait
Source
Deserializer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[R, A](deser: (String, Headers, Array[Byte]) => RIO[R, A]): Deserializer[R, A]

Create a deserializer from a function.

Create a deserializer from a function.

Attributes

Source
Deserializer.scala
def fromKafkaDeserializer[A](deserializer: Deserializer[A], props: Map[String, AnyRef], isKey: Boolean): Task[Deserializer[Any, A]]

Create a Deserializer from a Kafka Deserializer.

Create a Deserializer from a Kafka Deserializer.

Note: the wrapped deserializer is never closed.

Attributes

Source
Deserializer.scala

Inherited methods

def byteArray: Serde[Any, Array[Byte]]

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def byteBuffer: Serde[Any, ByteBuffer]

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def bytes: Serde[Any, Bytes]

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def double: Serde[Any, Double]

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def float: Serde[Any, Float]

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def int: Serde[Any, Int]

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def intOption: Serde[Any, Option[Int]]

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def long: Serde[Any, Long]

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def longOption: Serde[Any, Option[Long]]

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def short: Serde[Any, Short]

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key (Kafka's null) gets deserialized to a zero 0. Use the option variant (e.g. Serde.longOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def string: Serde[Any, String]

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala
def uuid: Serde[Any, UUID]

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

A tombstone value or missing key is returned as null. Combine with .asOption (e.g. Serde.bytes.asOption) to deserialize to an Option where null is deserialized as None.

Attributes

Inherited from:
Serdes (hidden)
Source
Serdes.scala