I am trying to create a set of services that send messages to each other using NServiceBus/MSMQ. I am doing so with NO XML configuration whatsoever, and I am also NOT planning on using the NServiceBus generic host for now (too much “black magic” with marker interfaces, profiles, containers and other crazy configuration options).
All I want to do is have my configuration be straightforward, and be completely contained in “Main()” and then be able to call Bus.Publish() in a loop or something. I have got everything working except for I don’t know how to get a reference to Bus.
Can anyone tell me how to do that? Thanks! 🙂
Try this: