Soenneker.Messages.Base
11.0.1234
Prefix Reserved
dotnet add package Soenneker.Messages.Base --version 11.0.1234
NuGet\Install-Package Soenneker.Messages.Base -Version 11.0.1234
<PackageReference Include="Soenneker.Messages.Base" Version="11.0.1234" />
<PackageVersion Include="Soenneker.Messages.Base" Version="11.0.1234" />
<PackageReference Include="Soenneker.Messages.Base" />
paket add Soenneker.Messages.Base --version 11.0.1234
#r "nuget: Soenneker.Messages.Base, 11.0.1234"
#:package Soenneker.Messages.Base@11.0.1234
#addin nuget:?package=Soenneker.Messages.Base&version=11.0.1234
#tool nuget:?package=Soenneker.Messages.Base&version=11.0.1234
Soenneker.Messages.Base
Defines shared envelope metadata for application messages serialized with System.Text.Json.
Installation
dotnet add package Soenneker.Messages.Base
Define a message
Derive the application payload from Message and give the type a stable, versioned identifier:
using Soenneker.Messages.Base;
using System.Text.Json.Serialization;
using System.Text.Json;
public sealed class UserCreatedMessage : Message
{
[JsonPropertyName("userId")]
public required string UserId { get; set; }
}
var message = new UserCreatedMessage
{
Type = "user.created.v1",
Id = Guid.NewGuid().ToString("N"),
Queue = "users",
Sender = "accounts-api",
CreatedAt = DateTimeOffset.UtcNow,
UserId = userId
};
The base metadata uses the same JSON names with System.Text.Json:
{
"type": "user.created.v1",
"id": "...",
"queue": "users",
"sender": "accounts-api",
"createdAt": "2026-08-30T12:00:00+00:00",
"userId": "..."
}
Contract semantics
Typeidentifies the payload contract. Change the version when consumers cannot read the new shape.Idis the message instance identifier and can be copied to a transport message ID for tracing or deduplication.QueueandSenderare envelope metadata; this package does not route or authenticate a message.CreatedAtshould be the original UTC creation time, including when a message is retried.
C# required members provide compile-time initialization guidance, but deserializers and reflection can still produce missing or empty values. Validate messages at the trust boundary before routing or processing them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Utils.Environment (>= 11.0.798)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Soenneker.Messages.Base:
| Package | Downloads |
|---|---|
|
Soenneker.ServiceBus.Message
A utility library for building Azure Service messages |
|
|
Soenneker.Messages.MsTeams
A Service Bus Message for Microsoft Teams webhook sending |
|
|
Soenneker.Messages.Email
A Service Bus message for emails |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.1234 | 444 | 11/11/2026 |
| 11.0.1233 | 662 | 11/11/2026 |
| 11.0.1232 | 240 | 11/11/2026 |
| 11.0.1231 | 161 | 11/11/2026 |
| 11.0.1230 | 85 | 11/11/2026 |
| 11.0.1229 | 709 | 11/10/2026 |
| 11.0.1228 | 1,729 | 11/3/2026 |
| 11.0.1227 | 1,373 | 11/2/2026 |
| 11.0.1226 | 195 | 11/2/2026 |
| 11.0.1225 | 272 | 11/2/2026 |
| 11.0.1224 | 1,892 | 10/26/2026 |
| 11.0.1223 | 277 | 10/26/2026 |
| 11.0.1222 | 412 | 10/26/2026 |
| 11.0.1221 | 585 | 10/26/2026 |
| 4.0.1220 | 2,690 | 10/15/2026 |
| 4.0.1219 | 106 | 10/15/2026 |
| 4.0.1217 | 275 | 10/14/2026 |
| 4.0.1216 | 632 | 10/14/2026 |
| 4.0.1215 | 102 | 10/14/2026 |
| 4.0.1214 | 157 | 10/14/2026 |
Updated Multiple NuGet packages