Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error occured while trying to use Nservice bus

I am new to NServcie bus and Im was trying to implement Publication and subscription of messages .This is the error I'm getting

Exception when starting endpoint, error has been logged. Reason: The destination queue 'mygateway' could not be found. You may have misconfigured the destination for this kind of message (NServiceBus.Unicast.Transport.CompletionMessage) in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file.It may also be the case that the given queue just hasn't been created yet, or has been deleted.

This is the configuration used that i used in app config

         <MsmqTransportConfig
                       InputQueue="publisherqueue"
                       ErrorQueue="error"
                       NumberOfWorkerThreads="1"
                        MaxRetries="5" />

      <UnicastBusConfig
         DistributorControlAddress=""
         DistributorDataAddress=""
         ForwardReceivedMessagesTo="">

         <MessageEndpointMappings>
           <add Messages="Messages"
               Endpoint="mygateway" />
         </MessageEndpointMappings>
       </UnicastBusConfig>

       <MsmqSubscriptionStorageConfig
              Queue="GateWaySubscriptions" />

My question is why this "mygateway " queue is not automatically created ? Am i doing anything wrong ? Please help.

Thanks Alex.

like image 267
wizzardz Avatar asked Aug 10 '10 04:08

wizzardz


1 Answers

This app you are configuring for only "owns" (use that term loosely) the queues in MsmqTransportConfig, namely, "publisherqueue" and "error". These are the only queues it will attempt to create for you.

Your MessageEndpointMappings section defines "remote" queues, i.e. your desire to either send messages from Messages to mygateway, or subscribe to Messages from mygateway. Another endpoint, with "mygateway" as its input queue, would be responsible for it up.

So what your app is telling you is "I see that you're interested in exchanging messages with mygateway, but I knocked and nobody's home."

like image 174
David Boike Avatar answered Sep 18 '22 21:09

David Boike