tags:

views:

167

answers:

1

First let me state, today is my first day using NSesrviceBus - so I hope my question isn't too elementary.

I have managed to set up Sender, Receiver, and Messages projects. When I debug the Sender, I see the messages show up in the configured queue. When I debug the Receiver, the messages are removed from the queue. However, my IHandleMessages Handle event never fires, and no Console output is displayed.

I'm sure I've done something wrong (I think I may have mixed tutorials from different versions of NServiceBus) - any suggestions would be appreciated.

A: 
  1. Are you Send()ing messages or Publish()ing them? If you're publishing, then they might be subscription messages and you may have no subscribers.
  2. Check out these two sets of great tutorials on the NServiceBus Wiki.
  3. In your receiver are you not even getting the slew of debug info when the host process starts up?
  4. Are you using a fluent configuration in your IConfigureThisEndpoint implementation? If so, what?
David
Thanks for your reply.1. I am Sending the messages.3. I am not using the NServiceBus.Host.exe. *If I understand correctly*, the debug info will not print because of this. When I do use NServiceBus.Host.exe, I do see the debug info.
grefly
4.Sender:Configure.With().XmlSerializer().MsmqSubscriptionStorage().MsmqTransport().IsTransactional(false).PurgeOnStartup(false).UnicastBus().ImpersonateSender(false).CreateBus().Start();Receiver:message_handler.Bus = Configure.With().XmlSerializer().MsmqTransport().IsTransactional(false).PurgeOnStartup(false).UnicastBus().ImpersonateSender(false).LoadMessageHandlers().CreateBus().Start();
grefly
I had run through the first tutorial, no luck. At your suggestion, I tried the second, still no luck.
grefly
I've never tried having a message handler in a process that didn't use the NServiceBus host process. I think there's more to setting up the message handlers than just instantiating a bus. I would try testing in a host process - if it works, then there is something the host process is doing that you aren't, which you can try to identify or re-evaluate your decision not to use it. If it still doesn't work, hopefully all the debug output provided by the logger will give you some insight into why.
David
Thank you, I am now using the NServiceBus.Host.exe in the Receiver - just a quick question, should be easy to answer...When you deploy a Sender to production, the Receiver always runs under NServiceBus.Host.exe?
grefly
I run everything that is ONLY a messaging endpoint using NServiceBus.Host.exe. I only step outside the host process if it's something with a UI (like web or win forms) or some other absolute requirement to not use the host, and then it's just usually sending messages (and maybe receiving replies) from a bus, but never any message handlers.
David