MSMQ to WCF, enabling Two Way Communication
We are building a common WCF Service which is being used by two different typ开发者_运维百科es of clients, ones which will use the normal Two way http binding, while the other ones will use the MSMQ binding, as the MSMQ Binding means that we can only do One Way Messages, according to this scenario my questions are
what is the possibility of using the same contract for both the clients while the contract will have the messages with the Both Way communications.
Is there a way that we can achieve the Two Way communication on the MSMQ.
What if the MSMQ is being used only for the Guaranteed Delivery, What can be alternatives for Guaranteed Delivery, where the Server and clients can have a flaky connection in between them.
- There is no possibility. You need two service contracts - one for MSMQ and one for HTTP.
- No. Two way over MSMQ = one queue for service and one queue for each client where client exposes its own MSMQ service to read messages from his queue.
- Guaranteed delivery is available only for MSMQ because that guarantee is not only about flaky connection but also about not running service (messages are kept in queue until service is up and running). If you need to deal with flaky connection over HTTP you need WS-Reliable messaging (available for custom bindings or
wsHttpBinding
) but it is not the same as guaranteed delivery because it works only if both server and client are running.
精彩评论