Excalibur.Dispatch.Serialization.Protobuf
10.0.0-alpha.8
See the version list below for details.
dotnet add package Excalibur.Dispatch.Serialization.Protobuf --version 10.0.0-alpha.8
NuGet\Install-Package Excalibur.Dispatch.Serialization.Protobuf -Version 10.0.0-alpha.8
<PackageReference Include="Excalibur.Dispatch.Serialization.Protobuf" Version="10.0.0-alpha.8" />
<PackageVersion Include="Excalibur.Dispatch.Serialization.Protobuf" Version="10.0.0-alpha.8" />
<PackageReference Include="Excalibur.Dispatch.Serialization.Protobuf" />
paket add Excalibur.Dispatch.Serialization.Protobuf --version 10.0.0-alpha.8
#r "nuget: Excalibur.Dispatch.Serialization.Protobuf, 10.0.0-alpha.8"
#:package Excalibur.Dispatch.Serialization.Protobuf@10.0.0-alpha.8
#addin nuget:?package=Excalibur.Dispatch.Serialization.Protobuf&version=10.0.0-alpha.8&prerelease
#tool nuget:?package=Excalibur.Dispatch.Serialization.Protobuf&version=10.0.0-alpha.8&prerelease
Excalibur.Dispatch.Serialization.Protobuf
Opt-in Protocol Buffers serialization support for the Excalibur framework.
Purpose
Provides Protocol Buffers (Protobuf) serialization for:
- Google Cloud Platform (GCP) interoperability
- AWS service integration requiring Protobuf
- High-performance binary protocols
- External systems using
.protoschema definitions
Installation
dotnet add package Excalibur.Dispatch.Serialization.Protobuf
Usage
One call does everything -- DI registration, serializer registry entry, and setting Protobuf as the current serializer:
services.AddProtobufSerializer();
Configure Protobuf Options
services.AddProtobufSerializer(opts =>
{
// Wire format: Binary (default) or JSON
opts.WireFormat = ProtobufWireFormat.Binary;
});
Message Definition
Your message types must implement Google.Protobuf.IMessage and have source-generated parsers:
using Google.Protobuf;
// Example: Generated from .proto file
public partial class UserCreatedEvent : IMessage<UserCreatedEvent>
{
// Source-generated Protobuf code
}
Package Dependencies
- Google.Protobuf - Protocol Buffers runtime
- Excalibur.Dispatch.Abstractions - Core contracts only (no Excalibur.Dispatch dependency)
AOT Compatibility
Native AOT compatible with source-generated Protobuf types.
Ensure your .proto files are compiled with protoc to generate C# code, and the generated types will be trim-safe.
Wire Formats
Binary (Default - Recommended)
opts.WireFormat = ProtobufWireFormat.Binary;
- Compact binary format
- Fastest serialization/deserialization
- Best for internal/transport use
JSON
opts.WireFormat = ProtobufWireFormat.Json;
- Human-readable JSON representation
- Useful for debugging or external API boundaries
- Slower than binary format
When to Use This Package
Use Protobuf serialization when:
- Integrating with GCP services (Cloud Pub/Sub, Cloud Functions, etc.)
- AWS services require Protobuf (EventBridge, Kinesis with Protobuf schema)
- External systems expose Protobuf schemas (
.protofiles) - You need schema evolution with backward/forward compatibility
Do NOT use Protobuf when:
- Internal Excalibur.Dispatch messaging (use MemoryPack or JSON)
- Public HTTP/REST APIs (use System.Text.Json)
- No Protobuf schema requirements exist
Architecture Notes
Per Excalibur framework requirements:
- Excalibur.Dispatch MUST NOT reference this package (R0.14 compliance)
- This package is pay-for-play (R0.5: no transitive bloat)
- System.Text.Json is the default serializer
- This package is opt-in only (R9.46)
Performance Characteristics
- Serialization: ~100-500 ns/op (binary), ~1-5 us/op (JSON)
- Allocations: Minimal (reuses buffers where possible)
- Throughput: ~1-5 million msg/sec (binary), ~200k-1M msg/sec (JSON)
Schema Evolution
Protobuf supports schema evolution via:
- Field numbers: Never reuse field numbers
- Reserved fields: Mark removed fields as
reserved - Optional fields: Use
optionalfor nullable fields - Unknown fields: Preserved if
PreserveUnknownFields = true
Example .proto:
syntax = "proto3";
message UserCreatedEvent {
string user_id = 1;
string email = 2;
reserved 3; // Removed field
// New field with number 4
string full_name = 4;
}
License
This package is licensed under the same licenses as the Excalibur framework:
- Excalibur License 1.0
- GNU Affero General Public License v3.0 or later (AGPL-3.0)
- Server Side Public License v1.0 (SSPL-1.0)
- Apache License 2.0
See LICENSE files in project root for details.
Support
For issues, questions, or contributions, visit:
- GitHub: https://github.com/TrigintaFaces/Excalibur
- Documentation: (link to docs when published)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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.12.0)
- Excalibur.Dispatch (>= 10.0.0-alpha.8)
- Excalibur.Dispatch.Abstractions (>= 10.0.0-alpha.8)
- Google.Protobuf (>= 3.34.1)
- Medo.Uuid7 (>= 3.2.0)
- Microsoft.AspNetCore.Authorization (>= 10.0.7)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.ObjectPool (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- System.Threading.RateLimiting (>= 10.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0-alpha.12 | 37 | 9/25/2026 |
| 10.0.0-alpha.11 | 58 | 9/15/2026 |
| 10.0.0-alpha.10 | 63 | 9/6/2026 |
| 10.0.0-alpha.9 | 57 | 8/31/2026 |
| 10.0.0-alpha.8 | 73 | 8/14/2026 |
| 10.0.0-alpha.7 | 70 | 8/13/2026 |
| 10.0.0-alpha.6 | 74 | 8/11/2026 |
| 10.0.0-alpha.5 | 63 | 8/10/2026 |
| 10.0.0-alpha.4 | 69 | 8/10/2026 |
| 3.0.0-alpha.216 | 77 | 6/30/2026 |
| 3.0.0-alpha.215 | 72 | 6/23/2026 |
| 3.0.0-alpha.214 | 87 | 6/23/2026 |
| 3.0.0-alpha.208 | 70 | 6/11/2026 |
| 3.0.0-alpha.207 | 75 | 6/11/2026 |
| 3.0.0-alpha.205 | 74 | 6/10/2026 |
| 3.0.0-alpha.204 | 65 | 6/8/2026 |
| 3.0.0-alpha.203 | 66 | 6/8/2026 |
| 3.0.0-alpha.202 | 61 | 6/8/2026 |
| 3.0.0-alpha.201 | 65 | 6/8/2026 |
| 3.0.0-alpha.199 | 67 | 6/8/2026 |
See CHANGELOG.md for release notes