Table of Contents

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

message object

The message object to be serialized.

headers MessageHeaderCollection

The message headers collection.

endpoint ProducerEndpoint

The endpoint.

Returns

ValueTask<Stream>

A Task<TResult> representing the asynchronous operation. The task result contains the Stream with the serialized message.