SharpCoder
SharpCoder

Reputation: 19163

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.

Upvotes: 7

Views: 6487

Answers (4)

Wayne Ellery
Wayne Ellery

Reputation: 7958

It was because you missed the step to add the NServiceBus Host endpoint:

Go ahead and create another endpoint called OrderProcessing as an NServiceBus Host.

Upvotes: 0

Seymour
Seymour

Reputation: 7067

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");

Upvotes: 7

Dzianis Yafimau
Dzianis Yafimau

Reputation: 2016

You should specify endpoint config:

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

Upvotes: 2

stephenl
stephenl

Reputation: 3129

I'm not sure what you might have done, but it sounds like you have missed a step somewhere. I followed the tutorial and created a working copy for your reference, I hope it will help you identify the issue.

https://github.com/sliedig/NServiceBusStudio.Amazon.Demo

Upvotes: 0

Related Questions