3

当我们使用 /install 标志将 NServiceBus 3.3.6 端点安装为 Windows 服务时,它会自动配置为具有对消息队列的 Windows 服务依赖性。

然而,即使我们的 NServiceBus 端点使用 RavenDb 进行持久化,安装程序也不会配置对 RavenDb 的服务依赖。这意味着当我们的服务器重新启动时,我们的大多数 NServiceBus 端点由于以下异常而无法启动:

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.

有没有办法告诉 NServiceBus 建立对 RavenDb 的依赖关系,或者这是我们必须手动配置的东西,也许使用INeedToInstallSomething<T>

4

1 回答 1

10

您可以传递依赖项列表,例如:

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

列表需要用逗号分隔。

在 v4 中,命令行参数有点不同:

NServiceBus.Host.exe -install -dependsOn=MSMQ -dependsOn=RavenDB
于 2013-08-05T23:42:45.903 回答