Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Welcome dear friend!
Welcome to the official Rebus documentation wiki! In here, you will find a few snippets and some words about Rebus. If you haven't already done it, you might want to read the introduction.
If you came here to find out how to bring Rebus into your project, you can simply
Install-Package Rebus -ProjectName <your-project>
in order to install Rebus into your project, possibly followed by adding one or more of the good many integration packages available from Nuget.org.
After that, you
Configure.With(<1>) .Transport(t => t.Use<2>) .<3> .Start();
- would be either Rebus'
BuiltinHandlerActivatoror a "container adapter" (i.e. a bridge to your favorite IoC container)
- would depend on which transport you intended to use – e.g. if you
Install-Package Rebus.Msmq, an extension method would be available so you could do this:
.Transport(t => t.UseMsmq("my-queue"))
- would be zero or more additional configuration extensions
and then the bus would be started.
Please check out the samples repository for several examples on what can be configured.
Rebus depends on Newtonsoft JSON.NET only, and it supports .NET 4.5 or .NET Standard 1.3 as platform targets. This means that there is a pretty good chance that Rebus is supported on your platform, regardless of whether you are using the full .NET framework or are using .NET Core.
Integration with other stuff can be achieved with various integration DLLs, which of course might impact supported platforms (e.g.
Rebus.Msmq does not support .NET Core because there is no MSMQ driver for .NET Core).
Get the library
Rebus binaries are available as NuGet packages on NuGet.org and can be found by searching for NuGet packages with the text "rebus". If you're a PSH kind of guy, you could e.g.
install-package rebus -projectName NameOfYourProject.
You might want to take a look at this very simple sample:
Also, you might want to check out the "Scenarios" section further down for some information on how different problems can be solved very elegantly with Rebus.
If you're interested in seeing running code that show off various pieces of functionality in Rebus, you should take a look at the RebusSamples repository – it has code samples e.g. for request/reply, pub/sub, sagas, etc.
There's basically two ways of configuring Rebus: The configuration API and manual configuration. The configuration API is the preferred way of configuring it, but it can be an educative experience to try and configure it manually as well - just to get a chance to ponder a bit over each of Rebus' dependencies.
The following aspects can be (and some of them must be) configured:
When you're considering which aspects to configure, please take a moment to study the different bus modes - that should enable you to judge which aspects are required to configure, and which aspects can safely be left out.
Here's a couple of things that you might want to read:
- Different bus modes
- Return addresses
- Correlation IDs
- Message context
- Wire level format of messages
- Message compression and encryption
- Message auditing
- How does Rebus compare to other .NET service buses?
Here, I will briefly cover different scenarios where Rebus can really help.
- Web service integration - making synchronous calls to external systems robust by building an asynchronous request/reply messaging facade
- Handing off work - processing stuff asynchronously in the background
- Coordinating stuff that happens over time - using sagas to coordinate communication with multiple services
- and more
and then, a special message if you're implementing CQRS...
Rebus comes with a few things in addition to the messaging library. They are listed here, along with words on how mature/immature they are, etc.
Rebus now has a changelog in the repo: CHANGELOG.md