Table of Contents

Interface IMessageDeserializer

Namespace
Silverback.Messaging.Serialization
Assembly
Silverback.Integration.dll

Deserializes the messages consumed from broker.

public interface IMessageDeserializer

Properties

RequireHeaders

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

bool RequireHeaders { get; }

Property Value

bool

Methods

DeserializeAsync(Stream?, MessageHeaderCollection, ConsumerEndpoint)

Deserializes the byte array into a message object.

ValueTask<DeserializedMessage> DeserializeAsync(Stream? messageStream, MessageHeaderCollection headers, ConsumerEndpoint endpoint)

Parameters

messageStream Stream

The Stream containing the message to be deserialized.

headers MessageHeaderCollection

The message headers collection.

endpoint ConsumerEndpoint

The endpoint.

Returns

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.

IMessageSerializer GetCompatibleSerializer()

Returns

IMessageSerializer

A new instance of an IMessageSerializer compatible with this deserializer.