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 |
---|---|---|
System.Byte[] | key | The byte array to be deserialized. |
System.Collections.Generic.IReadOnlyCollection<MessageHeader> | messageHeaders | The message headers collection. |
MessageSerializationContext | context | The context information. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | key | The message key to be serialized. |
System.Collections.Generic.IReadOnlyCollection<MessageHeader> | messageHeaders | The message headers collection. |
MessageSerializationContext | context | The context information. |
Returns
Type | Description |
---|---|
System.Byte[] | The serialization result. |