Skip to content

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

License

Notifications You must be signed in to change notification settings

CloudNimble/SimpleMessageBus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 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

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 Messaging integration components with Azure WebJobs SDK dependency 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 Publishing integration component with Azure Queue Storag dependency to allow messages to be "put" on queues

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)
    • Windows Service
    • Azure WebJobs (Azure's web app offering)
    • Azure Functions (Azure's "serverless" offering)

Queues Supported

SimpleMessageBus currently supports two backing queues: the local file system, and Azure Storage Queues. This allows the Dispatcher to run entirely on-prem with no Azure dependencies, but still get the same durability and reliability through local poison queues and completed event storage.

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 or .NET 7 project to that will hold your defined Message types, install the SimpleMessageBus.Core NuGet package, and build out your Message types.
  2. Install the 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 or .NET 7 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 SimpleMessageBus.Dispatch NuGet package, reference the library you created in Step 3, and inject your MessageHandlers into the DependencyInjection container.

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 [email protected] 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