Table of Contents

Interface IBinaryEnvelopeDeserializer

Namespace
Excalibur.Dispatch.Serialization
Assembly
Excalibur.Dispatch.Abstractions.dll

Provides binary envelope deserialization for inbox and outbox messages when an optimized binary serializer (e.g., MemoryPack) is registered.

public interface IBinaryEnvelopeDeserializer
Extension Methods

Remarks

This interface decouples the outbox/inbox processors from specific binary serializer implementations. When consumers opt into a binary serializer, the serializer package registers an implementation of this interface that handles envelope deserialization using its native format.

When no binary serializer is registered, this interface is not resolved from DI and the processors fall back to JSON envelope handling.

Methods

DeserializeInboxEnvelope(ReadOnlySpan<byte>)

Deserializes a binary inbox envelope into a serializer-agnostic result.

EnvelopeData? DeserializeInboxEnvelope(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

The binary envelope data (without format marker byte).

Returns

EnvelopeData

The deserialized envelope data, or null if deserialization fails.

DeserializeOutboxEnvelope(ReadOnlySpan<byte>)

Deserializes a binary outbox envelope into a serializer-agnostic result.

EnvelopeData? DeserializeOutboxEnvelope(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

The binary envelope data (without format marker byte).

Returns

EnvelopeData

The deserialized envelope data, or null if deserialization fails.