Enterprise Service Bus libraries for .NET
As a software application becomes larger, you may want to break it into separate parts, both to manage complexity but also to aid scalability. But if you break an application apart, how will the separate parts communicate? One approach is to employ messaging using a publish/subscribe (pub/sub) bus.
A few years ago, I worked on an application that used NServiceBus just for this purpose, but I thought it would be useful to survey the .NET landscape to find out what’s available today.
Here’s a summary of the libraries I’ll be looking at over the next few blog posts:
Azure Service Bus, In-memory?, MSMQ, RabbitMQ, SQL Server
Azure Service Bus, In-memory, RabbitMQ
GreenPipes (>= 1.2.0)
NewId (>= 3.0.1)
Newtonsoft.Json (>= 10.0.3)
Newtonsoft.Json.Bson (>= 1.0.1)
Azure Service Bus
Microsoft.WindowsAzure.ConfigurationManager (= 2.0.3) Nimbus.InfrastructureContracts (>= 126.96.36.199)
Nimbus.MessageContracts (>= 188.8.131.52)
WindowsAzure.ServiceBus (>= 2.1.3 && <= 2.1.4)
MSMQ, RabbitMQ, SQL Server
Shuttle.Core.Infrastructure (>= 8.0.6)
Azure Service Bus, MSMQ, RabbitMQ
Newtonsoft.Json (>= 9.0.1)
These libraries range from the relatively simple and tightly focused to the complete ‘enterprise-level’ configurable, extensible and/or fully supported.
Some of these libraries distinguish between an ‘event’ (notify subscribers that something has happened) and a ‘command’ (tell subscribers that they should perform an action). Some support long-running business processes, often known as ‘sagas’. Some support distributed transactions. Some use dependency injection and can integrate with an inversion-of-control container.
And because the feature sets vary so widely, I’ll just be highlighting how each library implements publishing an ‘event’ message, and how you subscribe to these messages.