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

时间:2011-08-17 02:20:36

标签: nservicebus

我正在尝试使用NServiceBus 3(也就是github master)并且无法运行一些样本,即DataBus和AzureDataBus项目。

对于DataBus Receiver,它似乎期望配置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

对此有任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:1)

好的,今天再看看这个,并且能够找到一个有效的例子,并推断能够使这个工作。实际上变化相当简单。似乎UnicastBus尝试自动订阅,因此您需要发送者的以下内容......

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