1
votes

I have a Web Api project that publishes messages and a host that subscribes to those messages. This works fine in the development environment (tested in 2 machines).

When we deployed it to a Test server, it didn't work. The Publish method call doesn't throw any exception, it looks like everything is ok, but the message doesn't get added to the message queue. We checked the queue's permissions, everything is set up in the test server just like it is in our development environments.

This is how we setup the Bus in the Web Api:

Bus = Configure.With()
               .Log4Net()
               .DefaultBuilder()
               .UseTransport<Msmq>()
               .UnicastBus()
               .RavenSubscriptionStorage()
               .CreateBus()
               .Start((() => Configure.Instance.ForInstallationOn<Windows>().Install()));

EDIT: I just saw that the Subscriber is not registered in RavenDB. The publisher table contains no documents in the test server, while in the dev machine it contains the reference to the subscriber. Any idea on why this happened and how to fix it?

1
Anything in the logs? What version are you running? is your subscriber mappings ok in your .config file? What version of RavenDB are you running on TEST/DEV?Sean Farmar

1 Answers

0
votes

Dante, The subscriber should have sent a control message with the subscription. You should see that in your logs on your dev system too. It is the publisher that then stores the subscription.

Do you see any logging of the receiving of this? It's usually something like 'Subscribing to type .

If your publisher is receiving this then failing to connect to or find Raven, that should log some exceptions as well.

Double check your subscribers config to make sure the type you're subscribing to is mapped to the proper publisher and that the message is getting through. It could be stuck in the outbound queue on the machine with the subscriber...

Hope this helps! Joe.