Chris McKelt
Chris McKelt

Reputation: 1388

NServiceBus - System.InvalidOperationException: No destination specified for message(s):

I have an Endpoint I have configured ASA_Server. It just processes messages.

I'm getting the following message

System.InvalidOperationException: No destination specified for message(s):

Setup as follows:

 Configure.With()
            .LicensePath(LicenseFile)
            .CastleWindsorBuilder(WindsorAccessor.Instance.Container)
            .DefineEndpointName("phoenix.nservicebus.onevue")
            .Log4Net()
            .XmlSerializer()
            .MsmqTransport()
            .IsTransactional(true)
            .PurgeOnStartup(false)
             .Log4Net()
            .UnicastBus();

A website puts messages into the queue for this endpoint to process. Whilst operating on the message I get the stated error.

Had this working prior to a big refactor, appreciate the help - Thanks

Upvotes: 0

Views: 1636

Answers (2)

MeTitus
MeTitus

Reputation: 3428

Not a fan of NServiceBus in any way, but here are my two cents: That error is happening at run time right? It most likely means that you're sending a message type which you forgot to add to the NServiceBus conf file. It is raising that exception because it does not know what to do with the message.

Upvotes: 1

Chris McKelt
Chris McKelt

Reputation: 1388

Sorry found the error - my bad - in my refactoring I recursively called the same 'Send' method in the handler - thus resending the same message once the current one had been published - leading to a never ending loop - all fixed now

Upvotes: 2

Related Questions