The default persistence in NServiceBus is as of version 3.0 RavenDB. The NServiceBus license permits the use of RavenDB for the storage need of your endpoint. This only includes NServiceBus related data like sagas, subscriptions etc. If you are storing application specific data in Raven you need to purchase a separate license.
If you plan to use the default storage you need to make sure that you have a Raven server running that your endpoint can connect to. There are two ways to set this up:
- Download and install RavenDB your self
- Let NServiceBus do it for you
Use #1 if you’re already using raven or if you have other specific requirements for the installation.
#2 Auto installation by NServiceBus of RavenDB
RavenDB is included with the NServiceBus binaries (not ilmerged) and we have an infrastructure installer that will make sure that Raven is installed on the local machine when the installers are invoked.
The install is only performed if the following is true:
- Raven persistence is configured for the endpoint
- A custom connection string is not specified by the user
- The current endpoint has no master node specified
- Port 8080 is available
- Raven is not already installed
- The install is done using the explicit /installInfrastructure
#3 deserves a little more explanation. Having a master node defined tells NServiceBus that all data will be stored on the that server instead. This means that we expect the Raven server to be running on that remote machine and not the local machine where you’re running the install.
For instructions on how to administrate and operate a Raven server please see the documentation for RavenDB – http://ravendb.net/docs/server/administration
To upgrade an existing RavenDB you need to do the following:
- Back up your Raven database
- Shut down the RavenDB service
- Replace the binaries with the ones in the /Server folder in the download
- Make sure to not replace the Raven.Server.exe.config if you have modified it
- Restart the RavenDB service
Which versions of RavenDB is compatible
NServiceBus 3.X is tested and compatible with all RavenDB from version 616 up to 992. It has also been tested against RavenDB v2, so it is also a supported setup. We strongly recommend that you run your NServiceBus endpoints against 992 since it has better support for transaction recovery. This version can be downloaded here: