Cirreum.Messaging
1.1.1
dotnet add package Cirreum.Messaging --version 1.1.1
NuGet\Install-Package Cirreum.Messaging -Version 1.1.1
<PackageReference Include="Cirreum.Messaging" Version="1.1.1" />
<PackageVersion Include="Cirreum.Messaging" Version="1.1.1" />
<PackageReference Include="Cirreum.Messaging" />
paket add Cirreum.Messaging --version 1.1.1
#r "nuget: Cirreum.Messaging, 1.1.1"
#:package Cirreum.Messaging@1.1.1
#addin nuget:?package=Cirreum.Messaging&version=1.1.1
#tool nuget:?package=Cirreum.Messaging&version=1.1.1
Cirreum.Messaging
Provider-agnostic broker abstractions for the Cirreum Messaging track — queues, topics, subscriptions, and the outbound/received message model.
Overview
Cirreum.Messaging defines the transport abstraction the rest of the Messaging track builds on: a clean, broker-neutral API for sending to and receiving from queues, topics, and subscriptions. Provider packages (e.g., Cirreum.Messaging.Azure for Azure Service Bus) implement these interfaces; consumers program against the abstractions and never touch a broker SDK directly.
Cirreum.Messaging contains:
IMessagingClient— the entry point:UseQueue/UseQueueSender/UseQueueReceiver/UseTopic/UseSubscription, plusUseClient<T>to escape-hatch to the native provider client- Sending —
IMessagingQueueSender/IMessagingTopicSenderwith single and batch operations, andOutboundMessage(content, subject, correlation, TTL, and a cross-broker filterablePropertiesbag) - Receiving —
IMessagingQueueReceiver/IMessagingSubscriptionReceiverwith receive-one, receive-many, streaming (ReceiveMessagesStreamAsync), and peek; received messages expose content, properties, and the broker ack model (Complete/Abandon/Defer/DeadLetter/RenewLock) ReceiverTuning— optional broker-level tuning applied when a receiver is created (PrefetchCount), via overloads ofUseQueueReceiver/UseSubscription
Quick Start
Register a provider instance (see the provider package for configuration-driven registration; instances are keyed IMessagingClient registrations):
builder.AddAzureMessagingClient("primary", connectionString); // Cirreum.Messaging.Azure
Send and receive against the abstractions:
public sealed class OrderQueueService(
[FromKeyedServices("primary")] IMessagingClient client) {
public Task SendAsync(Order order, CancellationToken ct) =>
client.UseQueueSender("orders.pending.v1")
.PublishMessageAsync(
OutboundMessage.AsJsonContent(order).WithSubject("orders.created"),
ct);
public async Task ProcessOneAsync(CancellationToken ct) {
var received = await client.UseQueueReceiver("orders.pending.v1")
.ReceiveMessageAsync(cancellationToken: ct);
var order = JsonSerializer.Deserialize<Order>(received.ContentString);
// ... handle ...
await received.CompleteMessageAsync(ct); // or Abandon / Defer / DeadLetter
}
}
Streaming consumption (competing consumers):
await foreach (var received in client.UseQueueReceiver("orders.pending.v1")
.ReceiveMessagesStreamAsync(stoppingToken)) {
// ... handle + ack ...
}
Topics fan out to subscriptions:
await client.UseTopic("app.notifications.v1")
.BroadcastMessageAsync(OutboundMessage.AsJsonContent(notice).WithSubject("notice.raised"));
var received = await client.UseSubscription("app.notifications.v1", "api-head")
.ReceiveMessageAsync();
Receiver tuning
Receivers accept optional broker-level tuning at creation. Values you don't set fall back to the broker's own defaults:
var receiver = client.UseQueueReceiver("orders.pending.v1", new ReceiverTuning {
PrefetchCount = 50
});
Message-lock renewal is deliberately not here: it is a processing-time behavior over
IMessagingReceivedMessage.RenewLockAsync, owned by whoever runs the handler (e.g. the
distributed channel's receive loop in Cirreum.Runtime.Messaging), not a receiver-creation
option.
Two rules keep tuning honest:
- Provider support is required. A provider that has not opted into tuning throws
NotSupportedExceptionwhen the tuning carries values — it never silently discards them. - Tuning is creation-time. Receivers are cached by name, so requesting the same receiver again with different tuning throws rather than silently returning the previously created instance.
Where distributed messaging lives
This package is deliberately transport-only. The versioned-envelope model (DistributedMessage, DistributedMessageEnvelope, the registry, batching policies) ships in Cirreum.Messaging.Distributed, and the runtime delivery engine (publish-through-Conductor, batching, the inbound receiver) ships in Cirreum.Runtime.Messaging. The two are peers of this package's abstractions — both compose on top of IMessagingClient.
Contribution Guidelines
Be conservative with new abstractions
The API surface must remain stable and meaningful.Limit dependency expansion
Only add foundational, version-stable dependencies.Favor additive, non-breaking changes
Breaking changes ripple through the entire ecosystem.Include thorough unit tests
All primitives and patterns should be independently testable.Document architectural decisions
Context and reasoning should be clear for future maintainers.Follow .NET conventions
Use established patterns from Microsoft.Extensions.* libraries.
Versioning
Cirreum.Messaging follows Semantic Versioning:
- Major - Breaking API changes
- Minor - New features, backward compatible
- Patch - Bug fixes, backward compatible
License
This project is licensed under the MIT License - see the LICENSE file for details.
Cirreum Foundation Framework
Layered simplicity for modern .NET
| 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
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Cirreum.Messaging:
| Package | Downloads |
|---|---|
|
Cirreum.Services.Serverless
Cirreum infrastructure services for serverless applications |
|
|
Cirreum.Runtime.Messaging
Messaging services composition and the Distributed Messaging delivery engine for Cirreum server hosts: registers configured messaging providers (Azure Service Bus) as keyed IMessagingClient instances, and delivers DistributedMessage traffic with policy-driven batching, an inbound receiver, and OpenTelemetry observability. |
|
|
Cirreum.Messaging.Azure
Azure Service Bus provider for the Cirreum Messaging track — implements the IMessagingClient broker abstractions for queues, topics, and subscriptions. |
GitHub repositories
This package is not used by any popular GitHub repositories.