AMQP
Use Nimbus with AMQP brokers, optimized for ActiveMQ Artemis
The Nimbus AMQP transport connects to any AMQP 1.0 compliant broker. It is primarily tested against ActiveMQ Artemis and takes advantage of Artemis-specific extensions, most notably native scheduled message delivery via the _AMQ_SCHED_DELIVERY header. If you want a self-hosted, open-standard broker with full infrastructure control, AMQP is the right choice.
Installation
dotnet add package Nimbus.Transports.AMQP
Quick Start
Run ActiveMQ Artemis
docker run -d \
--name artemis \
-p 5672:5672 \
-p 8161:8161 \
-e ARTEMIS_USERNAME=admin \
-e ARTEMIS_PASSWORD=admin \
apache/activemq-artemis:latest
The Artemis web console is available at http://localhost:8161.
Configure Nimbus
using Nimbus;
using Nimbus.Configuration;
using Nimbus.Transports.AMQP;
var bus = new BusBuilder()
.Configure()
.WithNames("OrderService", Environment.MachineName)
.WithTransport(new AMQPTransportConfiguration()
.WithBrokerUri("amqp://localhost:5672")
.WithCredentials("admin", "admin"))
.WithTypesFrom(typeProvider)
.WithAutofacDefaults(container)
.Build();
await bus.Start();
Failover (recommended for production)
new AMQPTransportConfiguration()
.WithFailover("amqp://broker1:5672", "amqp://broker2:5672")
.WithCredentials("admin", "admin")
Scheduled Delivery
Nimbus uses Artemis’s native _AMQ_SCHED_DELIVERY header for deferred messages, so no polling or workaround is required — the broker itself holds the message until the scheduled time:
// Deliver after a delay
await bus.SendAfter(new MyCommand(), TimeSpan.FromMinutes(5));
// Deliver at a specific time
await bus.SendAt(new MyCommand(), DateTimeOffset.UtcNow.AddHours(1));
ActiveMQ Artemis 2.x+ required for scheduled delivery. ActiveMQ Classic 5.x has limited support and does not use _AMQ_SCHED_DELIVERY.
Limitations
- JMS selectors are not implemented — message filtering happens at the handler level.
Compatibility
- ✅ ActiveMQ Artemis 2.x+ (recommended — full feature support)
- ✅ ActiveMQ Classic 5.12+ (limited — delayed delivery not supported)
- ✅ Apache NMS AMQP 2.2.0