Interface ISerializer<T>
Defines a serializer for use with Producer<TKey, TValue>.
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public interface ISerializer<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
Serialize(T, SerializationContext)
Serialize the key or value of a Message<TKey, TValue> instance.
Declaration
byte[] Serialize(T data, SerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
T | data | The value to serialize. |
SerializationContext | context | Context relevant to the serialize operation. |
Returns
Type | Description |
---|---|
byte[] | The serialized value. |