David Broadfoot
David Broadfoot

Reputation: 300

Installing NServiceBus as a Windows Service with dependency on RavenDb

When we install an NServiceBus 3.3.6 endpoint as a Windows service using the /install flag, it is automatically configured with a windows service dependency on Message Queuing.

However, even though our NServiceBus endpoints use RavenDb for persistence, the installer does not configure a service dependency on RavenDb. This means that when our server restarts most of our NServiceBus endpoints fail to start up due to the following exception:

System.InvalidOperationException: 
The database {name} is currently being loaded, but after 30 seconds, 
this request has been aborted. Please try again later, database loading continues.

Is there any way to tell NServiceBus to set up a dependency on RavenDb or is this something we have to configure manually, perhaps using INeedToInstallSomething<T>?

Upvotes: 3

Views: 2138

Answers (1)

John Simons
John Simons

Reputation: 4288

You can pass a dependencies list eg:

NServiceBus.Host.exe /install /dependsOn:"MSMQ,RavenDB"

The list needs to be comma delimmited.

In v4 the command line args are a bit different:

NServiceBus.Host.exe -install -dependsOn=MSMQ -dependsOn=RavenDB

Upvotes: 10

Related Questions