1
votes

I'm hosting NServiceBus in my own application to act as a subscriber. I have 4 projects in the solution: 1. Contracts - declare the event interfaces 2. Host - class library with API to start the bus. 3. Handlers - here the event handlers are implemented. 4. Console application to run it all.

  • I see that the endpoint name is set correctly according to the console application name which is what I want and the queues are created accordingly.
  • I successfully subscribe to the publisher events.

The problem: When the publisher tries to send a message to the subscriber - it tries to send to a queue that is named according to the event handlers namespace and not the endpoint name.

The exception that I get is that the publisher could not find the subscribers input queue.

Just for a sanity check, I manually created the input queue that is named according to the handlers namespace and indeed I started to receive the events.

So, is this a bug in NServiceBus or have I missed something very crucial?

Thanks....

2

2 Answers

0
votes

I found the problem and it was mine...

The publisher still had old subscribers in its Raven DB so it tried to publish the events also to these queues which weren't there anymore...

To make my life easier, I configured the subscriptions to be stored using MSMQ.

0
votes

I had a similar issue. I renamed my endpoints but when calling Publish() it was still trying to send to the old queues. I went to localhost:8080 (RavenDB) and deleted all documents and databases but still had the same issues. Restarting the RavenDB service solved the issue, so it must cache them in memory or something.