Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NServiceBus : No destination specified for message(s):

I just created a new NServiceProject as specified in this link:

http://support.nservicebus.com/customer/portal/articles/856687-getting-started---creating-a-new-project

But after running the project, I am getting following error

"No destination specified for message(s):".

I am not sure where I am going wrong.

I have created ASP.NET MVC type project.

like image 644
SharpCoder Avatar asked Jan 28 '13 09:01

SharpCoder


2 Answers

The NServiceBus "No destination specified for message:" typically results from a missing or incorrectly defined routing configuration.

In order for NServiceBus to find the proper destination queue for a message, the routing configuration must define the delivery mapping. The routing can be defined for commands, types or events.

https://docs.particular.net/nservicebus/messaging/routing

The following snippet shows a routing example for NServiceBus 6:

var transport = endpointConfiguration.UseTransport<SqlServerTransport>();
var routerConfig = transport.Routing();
routerConfig.RouteToEndpoint(
    assembly: typeof(MyMessage).Assembly,
    destination: "my.nservicebus.queue");
like image 119
Seymour Avatar answered Sep 19 '22 14:09

Seymour


You should specify endpoint config:

<UnicastBusConfig ForwardReceivedMessagesTo="audit">
<MessageEndpointMappings>
  <add Messages="InternalMessages.Commands.SendOrderConfirmationEmail, InternalMessages" Endpoint="ExternalGateway.Salesforce" />
</MessageEndpointMappings>

like image 38
Dzianis Yafimau Avatar answered Sep 19 '22 14:09

Dzianis Yafimau