问题描述
在 NSB 2.6 中,当您定义发布者时,您可以指定 <DBSubscriptionStorageConfig/>
配置部分,以允许发布者将订阅存储在数据库中.
In NSB 2.6 when you define your publisher you can specify the <DBSubscriptionStorageConfig/>
configuration section to allow you publisher to store subscriptions in a database.
在 NSB 3.0 中,我没有看到指定 raven db 存储订阅的方法.我有点假设当发布者第一次启动时,它会为自己创建一个 raven 数据库存储.我已经在其他 3.0 端点上看到了这一点.但是,对于我正在部署的特定发布者端点,它不会创建 raven 数据库存储.
In NSB 3.0 I don't see a way to specify that raven db store the subscriptions. I have kind of assumed that when the publisher first starts it will create a raven db store for itself. I have seen this with other 3.0 endpoints. However, with the specific publisher endpoint I am deploying it doesn't create the raven db store.
谁能指出我应该检查的配置是否正确?
Could anyone point me to things I should check are configured correctly?
我的端点配置:
internal class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher, IWantCustomInitialization
{
public void Init()
{
Configure.With()
.XmlSerializer()
.DefiningEventsAs(t => t.Namespace != null && t.Namespace.EndsWith("Events", StringComparison.CurrentCulture));
}
}
我的应用配置:
<MessageForwardingInCaseOfFaultConfig ErrorQueue="error"/>
<UnicastBusConfig ForwardReceivedMessagesTo="audit" />
非常感谢
推荐答案
除非您在 Lite 配置文件中运行,否则默认使用 Raven 存储.您似乎也错过了在配置中设置构建器 (.DefaultBuilder() ) 的调用
Raven storage is used by default unless you run in the Lite profile. You also seems to miss a call to setup the builder (.DefaultBuilder() ) in your config
这篇关于NServiceBus 3.0 端点不创建 raven 数据库存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!