Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork371
🚌 Simple and lean service bus implementation for .NET
License
rebus-org/Rebus
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains Rebus "core". You may also be interested in one ofthe many integration libraries.
For information about the commercial add-on (support, tooling, etc.) to Rebus, please visitRebus FM's page about Rebus Pro.
Rebus is a lean service bus implementation for .NET. It is what ThoughtWorks in 2010 called a"message bus without smarts" - a librarythat works well as the "dumb pipes" when you need asynchronous communication in your microservices that followthe"smart endpoints, dumb pipes"principle.
Rebus aims to have
- a simple and intuitive configuration story
- a few well-selected options
- no doodleware
- as few dependencies as possible (currently onlyJSON.NET)
- a broad reach (targets .NET Standard 2.0, i.e. .NET Framework 4.6.1, .NET Core 2, and .NET 5 and onwards)
- integration with external dependencies via small, dedicated projects
- the best error messages in the world
- a frictionless getting-up-and-running-experience
and in doing this, Rebus should try to align itself with common, proven asynchronous messaging patterns.
Oh, and Rebus is FREE as in beer 🍺 and speech 💬, and it will stay that way forever.
If you want to read more, check outthe official Rebus documentation wiki or check outmy blog.
You can also follow me on Twitter:@mookid8000
Rebus is a simple .NET library, and everything revolves around theRebusBus class. One way to get Rebusup and running, is to manually go
varbus=newRebusBus(...);bus.Start(1);//< 1 worker thread// use the bus for the duration of the application lifetime// remember to dispose the bus when your application exitsbus.Dispose();
where... is a bunch of dependencies that vary depending on how you want to send/receive messages etc.Another way is to use the configuration API, in which case you would go
varsomeContainerAdapter=newBuiltinHandlerActivator();
for the built-in container adapter, or
varsomeContainerAdapter=newAdapterForMyFavoriteIocContainer(myFavoriteIocContainer);
to integrate with your favorite IoC container, and then
Configure.With(someContainerAdapter).Logging(l=>l.Serilog()).Transport(t=>t.UseMsmq("myInputQueue")).Routing(r=>r.TypeBased().MapAssemblyOf<SomeMessageType>("anotherInputQueue")).Start();// have IBus injected in application services for the duration of the application lifetime// let the container dispose the bus when your application exitsmyFavoriteIocContainer.Dispose();
which will stuff the resultingIBus in the container as a singleton and use the container to look upmessage handlers. Check out the Configuration section onthe official Rebus documentation wiki formore information on how to do this.
If you want to be more specific about what types you map in an assembly, such as if the assembly is shared with other code you can map all the types under a specific namespace like this:
Configure.With(someContainerAdapter).(...).Routing(r=>r.TypeBased().MapAssemblyNamespaceOf<SomeMessageType>("namespaceInputQueue")).(...);// have IBus injected in application services for the duration of the application lifetime// let the container dispose the bus when your application exitsmyFavoriteIocContainer.Dispose();
Rebus is licensed underThe MIT License (MIT). Basically, this license grants you the right to useRebus in any way you see fit. SeeLICENSE.md for more info.
The purpose of the license is to make it easy for everyone to use Rebus and its accompanying integrationlibraries. If that is not the case, please get in touch withhello@rebus.fmand then we will work something out.
About
🚌 Simple and lean service bus implementation for .NET
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
