Interface IKafkaMessageSerializer
Serializes and deserializes the messages sent through Kafka.
Inherited Members
Namespace: Silverback.Messaging.Serialization
Assembly: Silverback.Integration.Kafka.dll
Syntax
public interface IKafkaMessageSerializer : IMessageSerializer
Methods
| Improve this doc View sourceDeserializeKey(byte[], IReadOnlyCollection<MessageHeader>, MessageSerializationContext)
Deserializes the byte array back into a key string.
Declaration
string DeserializeKey(byte[] key, IReadOnlyCollection<MessageHeader> messageHeaders, MessageSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
byte[] | key | The byte array to be deserialized. |
IReadOnlyCollection<MessageHeader> | messageHeaders | The message headers collection. |
MessageSerializationContext | context | The context information. |
Returns
Type | Description |
---|---|
string | The deserialized key. |
SerializeKey(string, IReadOnlyCollection<MessageHeader>, MessageSerializationContext)
Serializes the specified key string into a byte array.
Declaration
byte[] SerializeKey(string key, IReadOnlyCollection<MessageHeader> messageHeaders, MessageSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
string | key | The message key to be serialized. |
IReadOnlyCollection<MessageHeader> | messageHeaders | The message headers collection. |
MessageSerializationContext | context | The context information. |
Returns
Type | Description |
---|---|
byte[] | The serialization result. |