Error occured while trying to use Nservice bus
Asked Answered
B

1

5

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.

Barrett answered 10/8, 2010 at 4:7 Comment(0)
F
7

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."

Flagg answered 10/8, 2010 at 13:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.