Skip to content

CloudNimble/SimpleMessageBus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleMessageBus - By CloudNimble


A framework for reliable, distributed, scalable, cross-platform event processing on .NET.


Website     |     Releases    |     Documentation    

Build Status Release Status Twitter

What is SimpleMessageBus?

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.

Benefits

  • 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.

Ecosystem

Core Packages

Project Release Latest Description
SimpleMessageBus.Core smb-core-rtm smb-core-ci Core components to provide messaging and file operations capabilities for On-Prem and Cloud environments.
SimpleMessageBus.Dispatch smb-dispatch-rtm smb-dispatch-ci Base messaging integration components to accept and direct messages to proper message handler(s).
SimpleMessageBus.Hosting smb-hosting-rtm smb-hosting-ci Configuration components to allow selection of hosting type (i.e: WindowsService vs. Console).
SimpleMessageBus.Publish smb-publish-rtm smb-publish-ci Base publishing component with FileSystem support to allow messages to be "put" on queues.

Azure Integration

Project Release Latest Description
SimpleMessageBus.Dispatch.Azure smb-dispatch-azure-rtm smb-dispatch-azure-ci Azure Storage Queue dispatcher with WebJobs SDK integration for cloud-based message processing.
SimpleMessageBus.Publish.Azure smb-publish-azure-rtm smb-publish-azure-ci Azure Storage Queue publisher for cloud-based message queuing.

FileSystem Integration

Project Release Latest Description
SimpleMessageBus.Dispatch.FileSystem smb-dispatch-filesystem-rtm smb-dispatch-filesystem-ci Local and network file system dispatcher for on-premise message processing with enhanced Linux support.

Blazor WebAssembly Integration

Project Release Latest Description
SimpleMessageBus.IndexedDb.Core smb-indexeddb-core-rtm smb-indexeddb-core-ci Core IndexedDb components for browser-based message storage and management.
SimpleMessageBus.Dispatch.IndexedDb smb-dispatch-indexeddb-rtm smb-dispatch-indexeddb-ci IndexedDb dispatcher for browser-based Blazor WebAssembly message processing.
SimpleMessageBus.Publish.IndexedDb smb-publish-indexeddb-rtm smb-publish-indexeddb-ci IndexedDb publisher for browser-based message queuing in Blazor WebAssembly applications.

Architecture

The SimpleMessageBus Architecture

SimpleMessageBus consists of two main parts:

Publish

  • Manages the process of putting "messages" on the queue.
  • Very lightweight, minimal dependencies.
  • Straightforward configuration with Dependency Injection extensions.

Dispatch

  • 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)

Queues Supported

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.

Scenarios Supported

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.

Getting Started

The process of getting SimpleMessageBus working in your app is as easy as the name suggests.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Sample Projects

Check out our sample projects to see SimpleMessageBus in action:

Testing & Quality

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

Feedback

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.

Code of Conduct

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.

Contributors

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.

About

A framework for reliable, distributed, scalable, cross-platform event processing on .NET.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •