Koan.Messaging.Core
0.5.2
dotnet add package Koan.Messaging.Core --version 0.5.2
NuGet\Install-Package Koan.Messaging.Core -Version 0.5.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Koan.Messaging.Core" Version="0.5.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Koan.Messaging.Core" Version="0.5.2" />
<PackageReference Include="Koan.Messaging.Core" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Koan.Messaging.Core --version 0.5.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Koan.Messaging.Core, 0.5.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Koan.Messaging.Core@0.5.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Koan.Messaging.Core&version=0.5.2
#tool nuget:?package=Koan.Messaging.Core&version=0.5.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sylin.Koan.Messaging.Core
Core messaging abstractions and helpers for Koan: bus configuration, auto-registration, and options binding.
- Target framework: net9.0
- License: Apache-2.0
Install
dotnet add package Sylin.Koan.Messaging.Core
Links
- Messaging reference: https://github.com/sylin-labs/Koan-framework/tree/dev/docs/reference
Usage
Declare messages with attributes, then send via extension methods.
using Koan.Messaging;
[Message(Alias = "User.Registered", Version = 1)]
public sealed record UserRegistered(
string UserId,
[Header("x-tenant")] string Tenant,
[IdempotencyKey] string EventId,
[PartitionKey] string Partition,
[DelaySeconds] int DelaySeconds = 0);
// Single send (DefaultBus)
await new UserRegistered("u-123", "acme", "evt-1", "acme:u-123").Send();
// Send to a specific bus
await new UserRegistered("u-456", "acme", "evt-2", "acme:u-456").SendTo("rabbit");
// Batch send
var batch = new object[]
{
new UserRegistered("u-789", "acme", "evt-3", "acme:u-789"),
new UserRegistered("u-790", "acme", "evt-4", "acme:u-790")
};
await batch.Send(); // default bus
await batch.SendTo("rabbit"); // specific bus
Register handlers tersely
// Most concise (no envelope):
builder.Services.On<UserRegistered>(msg => Console.WriteLine($"New user: {msg.UserId}"));
// Async with CancellationToken
builder.Services.On<UserRegistered>((msg, ct) => HandleAsync(msg, ct));
// Keep envelope when needed
builder.Services.OnMessage<UserRegistered>((env, msg, ct) => HandleWithEnvelope(env, msg, ct));
// Intent-signaling aliases
builder.Services.OnEvent<UserRegistered>(msg => IndexUser(msg.UserId));
builder.Services.OnCommand<ReindexAll>(ct => ReindexAsync(ct));
Notes
Send
/SendTo
are defined onMessagingExtensions
and operate per-message when batching.- Headers/correlation/idempotency are promoted from attributes; partitions add a
.p{n}
suffix to routing keys.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Koan.Core (>= 0.5.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.8)
- Microsoft.Extensions.Options (>= 9.0.8)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Koan.Messaging.Core:
Package | Downloads |
---|---|
Koan.Messaging.RabbitMq
RabbitMQ transport for Koan Messaging: resilient connection management, config-first options, and inbox integration. |
|
Koan.Flow.Core
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.5.2 | 230 | 9/16/2025 |
See release notes: https://github.com/sylin-labs/Koan-framework/releases