Show / Hide Table of Contents

    Interface IMessageSerializer

    Serializes the messages produced to the broker.

    Namespace: Silverback.Messaging.Serialization
    Assembly: Silverback.Integration.dll
    Syntax
    public interface IMessageSerializer

    Methods

    SerializeAsync(object?, MessageHeaderCollection, ProducerEndpoint)

    Serializes the specified message object into a byte array.

    Declaration
    ValueTask<Stream?> SerializeAsync(object? message, MessageHeaderCollection headers, ProducerEndpoint endpoint)
    Parameters
    Type Name Description
    object message

    The message object to be serialized.

    MessageHeaderCollection headers

    The message headers collection.

    ProducerEndpoint endpoint

    The endpoint.

    Returns
    Type Description
    ValueTask<Stream>

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

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini