Show / Hide Table of Contents

    Interface IMessageDeserializer

    Deserializes the messages consumed from broker.

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

    Properties

    RequireHeaders

    Gets a value indicating whether this serializer (with the current configuration) needs the headers support to work properly.

    Declaration
    bool RequireHeaders { get; }
    Property Value
    Type Description
    bool

    Methods

    DeserializeAsync(Stream?, MessageHeaderCollection, ConsumerEndpoint)

    Deserializes the byte array into a message object.

    Declaration
    ValueTask<DeserializedMessage> DeserializeAsync(Stream? messageStream, MessageHeaderCollection headers, ConsumerEndpoint endpoint)
    Parameters
    Type Name Description
    Stream messageStream

    The Stream containing the message to be deserialized.

    MessageHeaderCollection headers

    The message headers collection.

    ConsumerEndpoint endpoint

    The endpoint.

    Returns
    Type Description
    ValueTask<DeserializedMessage>

    A ValueTask<TResult> representing the asynchronous operation. The task result contains the deserialized message (or null when the input is null or empty) and the type of the message.

    GetCompatibleSerializer()

    Gets a new IMessageSerializer compatible with this deserializer.

    Declaration
    IMessageSerializer GetCompatibleSerializer()
    Returns
    Type Description
    IMessageSerializer

    A new instance of an IMessageSerializer compatible with this deserializer.

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