- Companion:
- class
Value members
Concrete methods
Creates a new Serializer which serializes
all values of type A
as null
.
Creates a new Serializer which serializes
all values of type A
as null
.
Creates a new Serializer which serializes
all values of type A
to the specified bytes
.
Creates a new Serializer which serializes
all values of type A
to the specified bytes
.
Creates a new Serializer which delegates serialization
to the specified Kafka Serializer
. Note the close
and
configure
functions won't be called for the delegate.
It is assumed the delegate serialize
function is pure.
If it's not pure, then use suspend
after delegate
,
so the impure behaviours can be captured properly.
Creates a new Serializer which delegates serialization
to the specified Kafka Serializer
. Note the close
and
configure
functions won't be called for the delegate.
It is assumed the delegate serialize
function is pure.
If it's not pure, then use suspend
after delegate
,
so the impure behaviours can be captured properly.
Creates a new Serializer which serializes all
values of type A
as the empty Array[Byte]
.
Creates a new Serializer which serializes all
values of type A
as the empty Array[Byte]
.
Creates a new Serializer which always fails
serialization with the specified exception e
.
Creates a new Serializer which always fails
serialization with the specified exception e
.
Creates a new Serializer which always fails serialization with a SerializationException using the specified message.
Creates a new Serializer which always fails serialization with a SerializationException using the specified message.
Creates a new Serializer which can use different Serializers depending on the record headers.
Creates a new Serializer which can use different Serializers depending on the record headers.
Creates a new Serializer from the specified function. Use lift instead if the serializer doesn't need access to the Kafka topic name or record headers.
Creates a new Serializer from the specified function. Use lift instead if the serializer doesn't need access to the Kafka topic name or record headers.
Creates a new Serializer from the specified function, ignoring to which Kafka topic the bytes are going to be sent and any record headers. Use instance instead if the serializer needs access to the Kafka topic name or the record headers.
Creates a new Serializer from the specified function, ignoring to which Kafka topic the bytes are going to be sent and any record headers. Use instance instead if the serializer needs access to the Kafka topic name or the record headers.
Creates a new Serializer which serializes String
values using the specified Charset
. Note that the
default String
serializer uses UTF-8
.
Creates a new Serializer which serializes String
values using the specified Charset
. Note that the
default String
serializer uses UTF-8
.
Creates a new Serializer which can use different Serializers depending on the Kafka topic name to which the bytes are going to be sent.
Creates a new Serializer which can use different Serializers depending on the Kafka topic name to which the bytes are going to be sent.
Creates a new Serializer which serializes UUID
values
as String
s with the specified Charset
. Note that the
default UUID
serializer uses UTF-8.
Creates a new Serializer which serializes UUID
values
as String
s with the specified Charset
. Note that the
default UUID
serializer uses UTF-8.
Implicits
Implicits
The identity Serializer, which does not perform any kind of serialization, simply using the input bytes as the output.
The identity Serializer, which does not perform any kind of serialization, simply using the input bytes as the output.
The option Serializer serializes None
as null
, and
serializes Some
values using the serializer for type A
.
The option Serializer serializes None
as null
, and
serializes Some
values using the serializer for type A
.