Serializer

zio.kafka.serde.Serializer
See theSerializer companion trait
object Serializer

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Serializer.type

Members list

Value members

Concrete methods

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

Create a serializer from a function.

Create a serializer from a function.

Attributes

def fromKafkaSerializer[A](serializer: Serializer[A], props: Map[String, AnyRef], isKey: Boolean): Task[Serializer[Any, A]]

Create a Serializer from a Kafka Serializer.

Create a Serializer from a Kafka Serializer.

Attributes

Inherited fields

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

Optimisation

Optimisation

Here, we're not using KafkaSerdes.ByteArray() because the underlying deserializer and serializer implementations are just identity functions.

That allows us to use ZIO.succeed instead of ZIO.attempt.

Attributes

Inherited from:
Serdes (hidden)
val byteBuffer: Serde[Any, ByteBuffer]

Attributes

Inherited from:
Serdes (hidden)
val bytes: Serde[Any, Bytes]

Attributes

Inherited from:
Serdes (hidden)
val double: Serde[Any, Double]

Attributes

Inherited from:
Serdes (hidden)
val float: Serde[Any, Float]

Attributes

Inherited from:
Serdes (hidden)
val int: Serde[Any, Int]

Attributes

Inherited from:
Serdes (hidden)
val long: Serde[Any, Long]

Attributes

Inherited from:
Serdes (hidden)
val short: Serde[Any, Short]

Attributes

Inherited from:
Serdes (hidden)
val string: Serde[Any, String]

Attributes

Inherited from:
Serdes (hidden)
val uuid: Serde[Any, UUID]

Attributes

Inherited from:
Serdes (hidden)