Interface IMessageSerializer
- Namespace
- Silverback.Messaging.Serialization
- Assembly
- Silverback.Integration.dll
Serializes the messages produced to the broker.
public interface IMessageSerializer
Methods
SerializeAsync(object?, MessageHeaderCollection, ProducerEndpoint)
Serializes the specified message object into a byte array.
ValueTask<Stream?> SerializeAsync(object? message, MessageHeaderCollection headers, ProducerEndpoint endpoint)
Parameters
messageobjectThe message object to be serialized.
headersMessageHeaderCollectionThe message headers collection.
endpointProducerEndpointThe endpoint.
Returns
- ValueTask<Stream>
A Task<TResult> representing the asynchronous operation. The task result contains the Stream with the serialized message.