GM.Messaging.Domain
1.2.0
dotnet add package GM.Messaging.Domain --version 1.2.0
NuGet\Install-Package GM.Messaging.Domain -Version 1.2.0
<PackageReference Include="GM.Messaging.Domain" Version="1.2.0" />
<PackageVersion Include="GM.Messaging.Domain" Version="1.2.0" />
<PackageReference Include="GM.Messaging.Domain" />
paket add GM.Messaging.Domain --version 1.2.0
#r "nuget: GM.Messaging.Domain, 1.2.0"
#:package GM.Messaging.Domain@1.2.0
#addin nuget:?package=GM.Messaging.Domain&version=1.2.0
#tool nuget:?package=GM.Messaging.Domain&version=1.2.0
<p align="center"> <img src="https://raw.githubusercontent.com/gmetskhvarishvili/GM.Messaging/master/icon.png" alt="GM.Messaging" width="140" height="140" /> </p>
GM.Messaging
A lightweight messaging setup for .NET built on Wolverine and RabbitMQ.
One call wires up the message bus from configuration — connection, resilience (retry + circuit
breaker), and producer/consumer topology — with a transactional outbox/inbox for reliable,
exactly-once-style integration events. Part of the GM.* family of packages. Targets net10.0.
Packages
This repository ships three packages that version and release in lockstep:
| Package | What it provides |
|---|---|
GM.Messaging |
AddGMMessaging — Wolverine + RabbitMQ wiring, resilience, topology, and the outbox relay worker. |
GM.Messaging.Domain |
IntegrationEvent, and the InboxMessage / OutboxMessage entities. |
GM.Messaging.Persistence |
EF Core configurations + an inbox store/processor. |
Install
dotnet add package GM.Messaging
Register
using GM.Messaging;
builder.Services.AddGMMessaging(builder.Configuration);
Configure
Everything comes from the Messaging configuration section (shape matches MessagingOptions);
every value has a sensible default:
{
"Messaging": {
"ServiceName": "orders-service",
"RabbitMq": {
"HostName": "localhost",
"Port": 5672,
"VirtualHost": "/",
"UserName": "guest",
"Password": "guest"
},
"Retry": { "MaxAttempts": 5, "InitialDelayMilliseconds": 250 },
"CircuitBreaker": { "Enabled": true, "FailurePercentageThreshold": 25 },
"OutboxRelay": { "BatchSize": 50, "PollingIntervalSeconds": 5 }
}
}
Optional ProducerTopology / ConsumerTopology sections declare exchange/queue routes, and the
configureWolverine callback on AddGMMessaging lets you customize Wolverine directly.
Publish an integration event
public record OrderPlaced(Guid OrderId) : IntegrationEvent;
// persist via the outbox for reliable delivery
var outbox = OutboxMessage.From(new OrderPlaced(orderId));
dbContext.Set<OutboxMessage>().Add(outbox);
await dbContext.SaveChangesAsync();
The outbox relay worker picks up unprocessed OutboxMessages and publishes them through
Wolverine; the inbox deduplicates and tracks consumed messages per consumer.
Local infrastructure
A docker-compose.yml is included to run PostgreSQL + RabbitMQ locally:
docker compose up gm.messaging.postgres gm.messaging.rabbitmq
Requirements
- .NET 10 SDK
- RabbitMQ (and a relational database for the outbox/inbox).
Contributing & releases
Versioning is automated from Conventional Commits — see CONTRIBUTING.md. All three packages release together under one version.
License
MIT — see LICENSE.
| 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 (2)
Showing the top 2 NuGet packages that depend on GM.Messaging.Domain:
| Package | Downloads |
|---|---|
|
GM.Messaging.Persistence
EF Core persistence for the GM.Messaging outbox/inbox: entity configurations, an inbox store/processor, and DI wiring. Part of the GM.Messaging family. |
|
|
GM.Messaging
A lightweight messaging setup for .NET built on Wolverine and RabbitMQ. One call (AddGMMessaging) wires up the message bus with config-driven RabbitMQ connection, resilience (retry + circuit breaker) and producer/consumer topology, plus an outbox relay worker. Part of the GM.Messaging family. |
GitHub repositories
This package is not used by any popular GitHub repositories.