NServiceBus 3.0 DataBus Sample No Destination Found for message type
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)] &开发者_StackOverflow中文版lt;(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.
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);
}
}
精彩评论