Having not used MSMQ before, I'm not at all clear an the client environment requirements to use it.
I'm designing a client/server solution that will integrate with a legacy system and I'm sold on messaging. I'd like to use a service bus implementation like MassTransit, but that requires MSMQ.
Do I have to ensure that every client PC has MSMQ installed on it?
I don't think my prospects of selling this to the keepers of The Administrator Password are very good.
Right now I can reliably expect every client machine to have Windows XP Professional installed, but that could change and my understanding is that MSMQ is not installed by default on more recent OSs, which would be an even bigger headache.
Can anyone elucidate for me how this works? I can't imagine how any commercial software can rely on 开发者_开发技巧MSMQ unless I'm missing something significant (I hope I am).
(The server is not an issue -- I have full control there.)
An ESB (or even a lightweight option like MassTransit or NServiceBus) is really not designed for client/server communication. If you have a thick-client application that needs to communicate with back-end services, it may be more sensible to build a SOAP and/or REST layer that the clients communicate with instead. Behind that service layer, you could use messaging internally depending upon your scaling requirements. Messaging is very useful to deal with highly dynamic loads, along with other technologies such as caching.
If you want to do messaging on the client, you might consider using a broker style messaging system (ActiveMQ fits here, it's a regular TCP/IP connection) and connect to it from the client. It's a way to do it, not necessarily the best way depending upon your situation. MassTransit can use ActiveMQ, allowing you to abstract the programming API of MSMQ/ActiveMQ into a more universal transport interface.
There are many options when designing distributed systems, whether or not you need client-to-client communication versus client-to-server communication can really help differentiate the various technology options.
To answer your basic question. Yes. Every PC would have to have the MSMQ service running. I don't think MSMQ is meant for a general user kind of software, but for enterprise.. server to server communication. I could certainly be wrong, but with the limitation you are asking about I don't see how it could be used for commercial software either.
The answer, from my experience, is : When using masstransit, use rabbitmq and not msmq. cf Masstransit: Can it use central msmq server? (Or should I start w/RabbitMQ from the start?)
精彩评论