Excalibur.Dispatch.Serialization.MemoryPack
3.0.0-alpha.131
dotnet add package Excalibur.Dispatch.Serialization.MemoryPack --version 3.0.0-alpha.131
NuGet\Install-Package Excalibur.Dispatch.Serialization.MemoryPack -Version 3.0.0-alpha.131
<PackageReference Include="Excalibur.Dispatch.Serialization.MemoryPack" Version="3.0.0-alpha.131" />
<PackageVersion Include="Excalibur.Dispatch.Serialization.MemoryPack" Version="3.0.0-alpha.131" />
<PackageReference Include="Excalibur.Dispatch.Serialization.MemoryPack" />
paket add Excalibur.Dispatch.Serialization.MemoryPack --version 3.0.0-alpha.131
#r "nuget: Excalibur.Dispatch.Serialization.MemoryPack, 3.0.0-alpha.131"
#:package Excalibur.Dispatch.Serialization.MemoryPack@3.0.0-alpha.131
#addin nuget:?package=Excalibur.Dispatch.Serialization.MemoryPack&version=3.0.0-alpha.131&prerelease
#tool nuget:?package=Excalibur.Dispatch.Serialization.MemoryPack&version=3.0.0-alpha.131&prerelease
Excalibur.Dispatch.Serialization.MemoryPack
High-performance MemoryPack binary serialization for Excalibur framework.
Purpose
Provides opt-in high-performance binary serialization for:
- Maximum throughput scenarios
- .NET-to-.NET communication
- Internal persistence (Outbox, Inbox, Event Store)
- AOT/NativeAOT deployment
Key Features
- Opt-In: JSON (System.Text.Json) is the default serializer (ADR-295). Install this package and register explicitly when you need maximum .NET performance.
- Serializer ID 1: Magic byte
0x01in persisted payloads - Zero-Allocation: ReadOnlySpan-based deserialization
- AOT-Compatible: Full NativeAOT and trimming support via source generation
- No consumer attributes needed: Consumer event types do NOT need
[MemoryPackable]. Only the internal envelope wrapper uses MemoryPack attributes.
Usage
Registration
One call does everything -- DI registration, serializer registry entry, and setting MemoryPack as the current serializer:
services.AddMemoryPackSerializer();
That is all you need. JSON is the default serializer; calling AddMemoryPackSerializer() opts you into MemoryPack for high-performance binary serialization.
Performance Characteristics
| Metric | Value | Notes |
|---|---|---|
| Serialization | ~150ns/1KB | Fastest .NET binary format |
| Deserialization | ~120ns/1KB | Zero-allocation span slicing |
| Payload Size | Smallest | Optimal binary encoding |
| Memory Pressure | Minimal | No GC allocations in hot path |
Pluggable Serialization Integration
MemoryPack is assigned Serializer ID 1 in the pluggable serialization system.
The magic byte 0x01 prefixes all MemoryPack-serialized payloads.
Stored Payload: [0x01][MemoryPack binary data...]
^
Magic byte identifies serializer
When to Use MemoryPack
Best For:
- Internal .NET-to-.NET communication
- Maximum performance requirements
- Event sourcing and Outbox persistence
- AOT/NativeAOT deployments
Consider Alternatives When:
- Cross-language consumers (use MessagePack - ID: 3)
- Debugging/human-readable storage (use System.Text.Json - ID: 2, the default)
- Schema-based contracts (use Protobuf - ID: 4)
Migration
From JSON to MemoryPack
// One call switches new messages to MemoryPack.
// Old JSON data remains readable via its magic byte.
services.AddMemoryPackSerializer();
From MemoryPack to Another Serializer
// Switch to a different serializer. Old MemoryPack data remains
// readable because the magic byte tells the system which deserializer to use.
services.AddMessagePackSerializer();
Package Dependencies
MemoryPack- Core MemoryPack serialization runtimeExcalibur.Dispatch.Abstractions- Core contracts
AOT Compatibility
Full NativeAOT support with source-generated serializers.
The internal envelope types use [MemoryPackable] with partial class declarations for source generation. Consumer event types do not need any attributes.
See Also
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.11.1)
- Excalibur.Dispatch (>= 3.0.0-alpha.131)
- Excalibur.Dispatch.Abstractions (>= 3.0.0-alpha.131)
- Medo.Uuid7 (>= 1.4.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.AspNetCore.Authorization (>= 9.0.9)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.ObjectPool (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- System.Threading.RateLimiting (>= 10.0.0)
-
net8.0
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.11.1)
- Excalibur.Dispatch (>= 3.0.0-alpha.131)
- Excalibur.Dispatch.Abstractions (>= 3.0.0-alpha.131)
- Medo.Uuid7 (>= 1.4.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.AspNetCore.Authorization (>= 9.0.9)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.ObjectPool (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.0)
- System.IO.Pipelines (>= 10.0.0)
- System.Threading.Channels (>= 10.0.0)
- System.Threading.RateLimiting (>= 10.0.0)
-
net9.0
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.11.1)
- Excalibur.Dispatch (>= 3.0.0-alpha.131)
- Excalibur.Dispatch.Abstractions (>= 3.0.0-alpha.131)
- Medo.Uuid7 (>= 1.4.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.AspNetCore.Authorization (>= 9.0.9)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.ObjectPool (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.0)
- System.Threading.Channels (>= 10.0.0)
- System.Threading.RateLimiting (>= 10.0.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Excalibur.Dispatch.Serialization.MemoryPack:
| Package | Downloads |
|---|---|
|
Excalibur.Data.MongoDB
MongoDB database provider implementation for Excalibur data access layer. |
|
|
Excalibur.EventSourcing.Postgres
Postgres implementations for Excalibur event sourcing, including event store, snapshot store, and outbox store. |
|
|
Excalibur.EventSourcing.SqlServer
SQL Server implementations for Excalibur event sourcing, including event store, snapshot store, and outbox store. |
|
|
Excalibur.Data.Postgres
Postgres database provider implementation for Excalibur data access layer. |
|
|
Excalibur.EventSourcing.Sqlite
SQLite implementations for Excalibur event sourcing. Lightweight event store and snapshot store for local development, testing, and embedded scenarios. Zero Docker dependency. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-alpha.131 | 0 | 4/10/2026 |
| 3.0.0-alpha.129 | 0 | 4/10/2026 |
| 3.0.0-alpha.125 | 34 | 4/10/2026 |
| 3.0.0-alpha.120 | 73 | 4/8/2026 |
| 3.0.0-alpha.118 | 51 | 4/8/2026 |
| 3.0.0-alpha.85 | 86 | 4/3/2026 |
| 3.0.0-alpha.84 | 215 | 3/31/2026 |
| 3.0.0-alpha.83 | 210 | 3/31/2026 |
| 3.0.0-alpha.82 | 224 | 3/31/2026 |
| 3.0.0-alpha.80 | 230 | 3/30/2026 |
| 3.0.0-alpha.79 | 214 | 3/29/2026 |
| 3.0.0-alpha.76 | 180 | 3/29/2026 |
| 3.0.0-alpha.75 | 191 | 3/27/2026 |
| 3.0.0-alpha.74 | 187 | 3/27/2026 |
| 3.0.0-alpha.70 | 188 | 3/26/2026 |
| 3.0.0-alpha.68 | 169 | 3/25/2026 |
| 3.0.0-alpha.66 | 152 | 3/25/2026 |
| 3.0.0-alpha.64 | 164 | 3/25/2026 |
| 3.0.0-alpha.62 | 128 | 3/24/2026 |
| 3.0.0-alpha.59 | 129 | 3/24/2026 |