Skip to main content

Pick Your Stack

Not sure which packages you need? Follow this guide to find the right combination for your scenario.

graph TD
START[What are you building?] --> SIMPLE[Simple dispatcher]
START --> ES[Event-sourced app]
START --> DIST[Distributed system]
START --> SERVERLESS[Serverless function]
START --> FULL[Full enterprise stack]

SIMPLE --> |Install| PKG_DISPATCH[Excalibur.Dispatch]

ES --> DB{Which database?}
DB --> SQL[SQL Server]
DB --> PG[PostgreSQL]
DB --> NOSQL[NoSQL]

SQL --> |Quick start| PKG_SQL_STARTER[Excalibur.Dispatch.SqlServer]
SQL --> |Production| PKG_SQL_FULL[Excalibur.SqlServer]
PG --> |Quick start| PKG_PG_STARTER[Excalibur.Dispatch.Postgres]
PG --> |Production| PKG_PG_FULL[Excalibur.Postgres]

ES --> TRANSPORT{Need messaging?}
TRANSPORT --> RMQ[Excalibur.Dispatch.RabbitMQ]
TRANSPORT --> KAFKA[Excalibur.Dispatch.Kafka]
TRANSPORT --> AZURE[Excalibur.Dispatch.Azure]
TRANSPORT --> AWS_PKG[Excalibur.Dispatch.Aws]

Simple Message Dispatcher

Replacing MediatR or building a basic command/query pipeline.

<PackageReference Include="Excalibur.Dispatch" />
services.AddDispatch(dispatch =>
{
dispatch.AddHandlersFromAssembly(typeof(Program).Assembly);
dispatch.UseValidation();
});

That's it. No other packages needed. See the Getting Started guide.


Event-Sourced Application

Which database?

Quick start — event sourcing + outbox + hosting:

<PackageReference Include="Excalibur.Dispatch.SqlServer" />

Production — adds inbox, sagas, leader election, audit logging, compliance:

<PackageReference Include="Excalibur.SqlServer" />
services.AddExcaliburSqlServer(sql =>
{
sql.ConnectionString = connectionString;
sql.UseLeaderElection = true;
sql.UseAuditLogging = true;
});

Adding a Message Transport

Choose a transport for publishing integration events between services:

<PackageReference Include="Excalibur.Dispatch.RabbitMQ" />
services.AddDispatchRabbitMQ(rmq =>
{
rmq.ConnectionString = "amqp://guest:guest@localhost";
});

Bundles: transport + resilience + observability.


Distributed System with Sagas

Start with the event-sourcing stack above, then add saga persistence:

<!-- Already have Excalibur.SqlServer or Excalibur.Postgres? Sagas are included. -->

<!-- If using individual packages, add: -->
<PackageReference Include="Excalibur.Saga.SqlServer" />
<!-- or -->
<PackageReference Include="Excalibur.Saga.Postgres" />

Serverless Functions

<PackageReference Include="Excalibur.Dispatch.Hosting.AzureFunctions" />

Full Enterprise Production Stack

Complete provider + transport — everything you need:

<!-- Database provider (pick one) -->
<PackageReference Include="Excalibur.SqlServer" />

<!-- Transport (pick one) -->
<PackageReference Include="Excalibur.Dispatch.RabbitMQ" />

<!-- Cross-cutting concerns (opt-in) -->
<PackageReference Include="Excalibur.Dispatch.Security" />
<PackageReference Include="Excalibur.Dispatch.Validation.FluentValidation" />
<PackageReference Include="Excalibur.Dispatch.Caching" />
services.AddExcaliburSqlServer(sql =>
{
sql.ConnectionString = connectionString;
sql.UseLeaderElection = true;
sql.UseAuditLogging = true;
});

services.AddDispatchRabbitMQ(rmq =>
{
rmq.ConnectionString = "amqp://guest:guest@localhost";
});

services.AddDispatch(dispatch =>
{
dispatch.AddHandlersFromAssembly(typeof(Program).Assembly);
dispatch.UseValidation().WithFluentValidation();
dispatch.UseCaching();
dispatch.UseSecurity(builder.Configuration);
});

Package Tiering

TierPurposeExamples
FeatureSingle concern, opt-inExcalibur.EventSourcing.SqlServer, Excalibur.Inbox.SqlServer
StarterGet up and running quicklyExcalibur.Dispatch.SqlServer, Excalibur.Dispatch.RabbitMQ
CompleteEverything for a providerExcalibur.SqlServer, Excalibur.Postgres

Starters bundle the most common features. Complete metapackages bundle everything for a database provider so you don't miss anything.


Next Steps