Suppose I have no network card installed on my computer, and I would like to have functionality similar to the following:
Process 1 will publish messages to some URI, say "Uri1"
var publisher = new Publisher("Uri1");
publisher.publish(new Message("Somedata");
Process 2 will both listen for messages on "Uri1" and publish messages to "Uri2"
var subscriber = new Subscriber("Uri1")
subscriber.MessageReceived += data => Console.Writeline(data.ToString());
var publisher = new Publisher("Uri2")
publisher.Publish(new Message("SomeMoreData"))
Process 3 will listen for messages from both URIs
var subscriber = new Subscriber("Uri1")
subscriber.MessageReceived += data => Console.Writeline(data.ToString());
var anotherSubscriber = new Subscriber("Uri2")
anotherSubscriber.MessageReceived += data => Console.Writeline(data.ToString());
All processes run on the same computer. After some research I believe MSMQ is the way to go (using queue names as URIs) but the implementation question remains. I came across several possibilities:
Using MSMQ directly
The problem I have with this approach is that I would have to manage the queues my self e.g. creation, population, purging... also from what I read I may encounter many pitfalls and limitations of MSMQ seeing as I am not experienced with it
Using NServiceBus, MassTransit or RhinoServiceBus (all use MSMQ) They all seem competent, especially NServiceBus, but I can't seem to figure out from the documentation how to extract the basic pubsub functionality from any of them so that I could encapsulate it in an interface similar to the above
Using WCF(over MSMQ) Again this looks like a good option, but seeing as I am far from a WCF expert I would like to make sure this is the way to go before I start delving into it
Our approach up until now has relied on PGM multicast which worked well enough, but the new requirement of working without a network card forces us to use another mechanism for offline work, at least as far as I know
Thanks!