SimpleMessageBus is a system for making applications more reliable and responsive to users by processing potentially long-running tasks out-of-band from the user's main workflow. It is designed to run either on-prem, or in the Microsoft Cloud, making it suitable for any application, and able to grow as your needs do.
- Allows you to build more user-responsive apps.
- Increases testability by decoupling long-latency events from UI-generated workflows.
- Pushes third-party dependencies to the edges of your app, streamlining deployments.
- Increases fault-tolerance by allowing you to easily track and replay failed messages.
Project | Release | Latest | Description |
---|---|---|---|
SimpleMessageBus.Core | Core components to provide messaging and file operations capabilities for On-Prem and Cloud environments. | ||
SimpleMessageBus.Dispatch | Base messaging integration components to accept and direct messages to proper message handler(s). | ||
SimpleMessageBus.Hosting | Configuration components to allow selection of hosting type (i.e: WindowsService vs. Console). | ||
SimpleMessageBus.Publish | Base publishing component with FileSystem support to allow messages to be "put" on queues. |
Project | Release | Latest | Description |
---|---|---|---|
SimpleMessageBus.Dispatch.Azure | Azure Storage Queue dispatcher with WebJobs SDK integration for cloud-based message processing. | ||
SimpleMessageBus.Publish.Azure | Azure Storage Queue publisher for cloud-based message queuing. |
Project | Release | Latest | Description |
---|---|---|---|
SimpleMessageBus.Dispatch.FileSystem | Local and network file system dispatcher for on-premise message processing with enhanced Linux support. |
Project | Release | Latest | Description |
---|---|---|---|
SimpleMessageBus.IndexedDb.Core | Core IndexedDb components for browser-based message storage and management. | ||
SimpleMessageBus.Dispatch.IndexedDb | IndexedDb dispatcher for browser-based Blazor WebAssembly message processing. | ||
SimpleMessageBus.Publish.IndexedDb | IndexedDb publisher for browser-based message queuing in Blazor WebAssembly applications. |
The SimpleMessageBus Architecture
SimpleMessageBus consists of two main parts:
- Manages the process of putting "messages" on the queue.
- Very lightweight, minimal dependencies.
- Straightforward configuration with Dependency Injection extensions.
- Runs in a separate process using the Azure WebJobs SDK.
- Manages messages coming off the queue and directs them to the proper message handler(s) to be processed.
- Allows multiple handlers to process the same message.
- Straightforward configuration with Dependency Injection extensions.
- Can run in the following environments:
- Console app (cross-platform with enhanced Linux support)
- Windows Service
- Azure WebJobs (Azure's web app offering)
- Azure Functions (Azure's "serverless" offering)
- Blazor WebAssembly (browser-based client-side processing)
SimpleMessageBus supports multiple backing queue implementations to meet diverse deployment needs:
- Local File System - Cross-platform file-based queues with enhanced Linux support for on-premise deployments
- Azure Storage Queues - Cloud-based queues with automatic scaling and Azure ecosystem integration
- IndexedDb - Browser-based queues for Blazor WebAssembly applications, enabling client-side message processing
- HTTP - RESTful message transmission for distributed and microservice architectures
This flexibility allows applications to run entirely on-premise with no cloud dependencies, in the cloud with automatic scaling, or in the browser for rich client-side experiences, while maintaining the same durability and reliability guarantees across all deployment scenarios.
SimpleMessageBus was designed to streamline the following scenarios:
- User-created long-latency events (post-registration emails, share notifications, etc)
- Incoming webhook processing (Stripe, SendGrid, GitHub, etc)
- Very-long-running tasks (batch processing, cron jobs, etc)
You can read more about these scenarios in our blog post.
The process of getting SimpleMessageBus working in your app is as easy as the name suggests.
- Create a new .NET Standard 2.0, .NET 6, .NET 8, or .NET 9 project to that will hold your defined Message types, install the
SimpleMessageBus.Core
NuGet package, and build out your Message types. - Install the appropriate
SimpleMessageBus.Publish.*
NuGet package into your app, reference the library you created in Step 1, and modify your workflows to publish Messages in response to events. - Create a new .NET Standard 2.0, .NET 6, .NET 8, or .NET 9 project that will hold your MessageHandlers, install the
SimpleMessageBus.Core
NuGet package, and build out your MessageHandlers. - Create a new Unit Test project, reference the library you created in Step 3, and test your MessageHandler library with a variety of synthetic Messages.
- Create a new Console project, install the appropriate
SimpleMessageBus.Dispatch.*
NuGet package, reference the library you created in Step 3, and inject your MessageHandlers into the DependencyInjection container.
Check out our sample projects to see SimpleMessageBus in action:
- Azure WebJobs Sample - Demonstrates Azure-based message processing
- Blazor WebAssembly Sample - Shows browser-based messaging with IndexedDb
- On-Premise Sample - File system-based message processing
- External Triggers Sample - Integration with external event sources
SimpleMessageBus includes comprehensive testing capabilities:
- Breakdance Integration - Enhanced testing framework for reliable message processing verification
- Unit Test Projects - Extensive test suites for Core, Dispatch, Azure, FileSystem, and Publishing components
- Cross-Platform Testing - Validated on Windows, Linux, and browser environments
Feel free to send us feedback on Twitter or file an issue. Feature requests are always welcome. If you wish to contribute, please take a quick look at the contribution guidelines.
Please adhere to our Code of Conduct during any interactions with CloudNimble team members and community members. It is strictly enforced on all official CloudNimble repositories, websites, and resources. If you encounter someone violating these terms, please let us know via DM on Twitter or via email at opensource@nimbleapps.cloud and we will address it as soon as possible.
Thank you to all the people who have contributed to the project: Source code Contributors
Please visit our Contribution document to start contributing to our project.