NServiceBus 3.0 DataBus 示例未找到消息类型的目标

发布于 2024-11-29 16:43:58 字数 2295 浏览 0 评论 0原文

我正在尝试使用 NServiceBus 3 (又名 github master ),但在运行某些示例时遇到问题,即 DataBus 和 AzureDataBus 项目。

对于 DataBus 接收器,它似乎期望配置 MessageEndpointMapping,但根据我的理解,这配置了发送消息的位置,并且对于接收器/AsA_Server 来说不应该是必需的。添加此配置项似乎确实证实了这一点。

这是错误日志

2011-08-17 14:14:16,183 [1] INFO  NServiceBus.Hosting.Roles.RoleManager [(null)] <(null)> - Role NServiceBus.AsA_Server configured
2011-08-17 14:14:16,392 [1] INFO  NServiceBus.Host [(null)] <(null)> - Going to activate profile: NServiceBus.Lite, NServiceBus.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c
2011-08-17 14:14:23,551 [1] INFO  NServiceBus.Licensing [(null)] <(null)> - Checking available license...
2011-08-17 14:14:23,553 [1] WARN  NServiceBus.Licensing [(null)] <(null)> - Could not find license file: C:\Projects\NServiceBus\Samples\DataBus\Receiver\bin\Debug\License\License.xml
2011-08-17 14:14:23,592 [1] WARN  NServiceBus.Licensing [(null)] <(null)> - This application requires a valid license to run.
2011-08-17 14:14:37,559 [1] FATAL NServiceBus.Hosting.GenericHost [(null)] <(null)> - System.InvalidOperationException: No destination could be found for message type Receiver.Messages.MessageWithLargePayload.
on of the configuration of this endpoint for an entry either for this specific message type or for its assembly.
   at NServiceBus.Unicast.UnicastBus.Subscribe(Type messageType, Predicate`1 condition) in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 411
   at NServiceBus.Unicast.UnicastBus.Subscribe(Type messageType) in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 359
   at NServiceBus.Unicast.UnicastBus.PerformAutoSubcribe() in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 760
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(Action startupAction) in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 745
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start() in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 708
   at NServiceBus.Hosting.GenericHost.Start() in c:\Projects\NServiceBus\src\hosting\NServiceBus.Hosting\GenericHost.cs:line 99

如有任何帮助,我们将不胜感激。

I am attempting to play around with NServiceBus 3 ( aka github master ) and am having trouble getting some of the Samples to run, namely the DataBus and AzureDataBus projects.

For the DataBus Receiver it seems that it is expecting a MessageEndpointMapping to be configured, but from my understanding this configures where to send messages and shouldn't be required for a receiver/AsA_Server. Adding this config item did seem to confirm that.

Here is the error log

2011-08-17 14:14:16,183 [1] INFO  NServiceBus.Hosting.Roles.RoleManager [(null)] <(null)> - Role NServiceBus.AsA_Server configured
2011-08-17 14:14:16,392 [1] INFO  NServiceBus.Host [(null)] <(null)> - Going to activate profile: NServiceBus.Lite, NServiceBus.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c
2011-08-17 14:14:23,551 [1] INFO  NServiceBus.Licensing [(null)] <(null)> - Checking available license...
2011-08-17 14:14:23,553 [1] WARN  NServiceBus.Licensing [(null)] <(null)> - Could not find license file: C:\Projects\NServiceBus\Samples\DataBus\Receiver\bin\Debug\License\License.xml
2011-08-17 14:14:23,592 [1] WARN  NServiceBus.Licensing [(null)] <(null)> - This application requires a valid license to run.
2011-08-17 14:14:37,559 [1] FATAL NServiceBus.Hosting.GenericHost [(null)] <(null)> - System.InvalidOperationException: No destination could be found for message type Receiver.Messages.MessageWithLargePayload.
on of the configuration of this endpoint for an entry either for this specific message type or for its assembly.
   at NServiceBus.Unicast.UnicastBus.Subscribe(Type messageType, Predicate`1 condition) in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 411
   at NServiceBus.Unicast.UnicastBus.Subscribe(Type messageType) in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 359
   at NServiceBus.Unicast.UnicastBus.PerformAutoSubcribe() in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 760
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(Action startupAction) in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 745
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start() in c:\Projects\NServiceBus\src\unicast\NServiceBus.Unicast\UnicastBus.cs:line 708
   at NServiceBus.Hosting.GenericHost.Start() in c:\Projects\NServiceBus\src\hosting\NServiceBus.Hosting\GenericHost.cs:line 99

Any help with this would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别再吹冷风 2024-12-06 16:43:58

好吧,今天再看一下这个,找到了一个有效的例子,并推断出这个例子能够正常工作。改变其实很简单。似乎 UnicastBus 尝试自动订阅,因此您需要为发送者提供类似以下内容......

internal class SetupDataBus : IWantCustomInitialization 
{ 
    public static string BasePath = "..\\..\\..\\storage"; 
    public void Init() 
    { 
        Configure.Instance.UnicastBus().DoNotAutoSubscribe().FileShareDataBus(BasePath); 
    }
}

Ok so had another look at this today and was able to find an example which worked, and extrapolating that was able to get this one working. Change is rather simple actually. Seems that the UnicastBus attempts to autosubscribe so you need something like the following for the sender.....

internal class SetupDataBus : IWantCustomInitialization 
{ 
    public static string BasePath = "..\\..\\..\\storage"; 
    public void Init() 
    { 
        Configure.Instance.UnicastBus().DoNotAutoSubscribe().FileShareDataBus(BasePath); 
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文