MSMQ 到 WCF,实现双向通信

发布于 2024-11-28 01:25:19 字数 290 浏览 5 评论 0原文

我们正在构建一个通用的 WCF 服务,该服务由两种不同类型的客户端使用,其中一种将使用正常的双向 http 绑定,而另一种将使用 MSMQ 绑定,因为 MSMQ 绑定意味着我们只能执行一种操作双向消息,根据这种情况,我的问题是

  1. 为两个客户端使用相同的合约的可能性是什么,而合约将包含双向通信

  2. 有没有一种方法可以实现MSMQ上的双向通信。

  3. 如果 MSMQ 仅用于保证交付怎么办?保证交付的替代方案是什么,其中服务器和客户端之间可以有片状连接。

We are building a common WCF Service which is being used by two different types 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

  1. 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.

  2. Is there a way that we can achieve the Two Way communication on the MSMQ.

  3. 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╰◇生如夏花灿烂 2024-12-05 01:25:19
  1. 没有可能。您需要两个服务合同 - 一份用于 MSMQ,一份用于 HTTP。
  2. 否。 MSMQ 的两种方式 = 一个用于服务的队列和一个用于每个客户端的队列,其中客户端公开其自己的 MSMQ 服务以从其队列中读取消息。
  3. 保证传送仅适用于 MSMQ,因为该保证不仅涉及不稳定的连接,还涉及不运行的服务(消息将保留在队列中,直到服务启动并运行)。如果您需要处理 HTTP 上的不稳定连接,则需要 WS-Reliable 消息传递(可用于自定义绑定或 wsHttpBinding),但它与保证交付不同,因为它仅在服务器和客户端都正常工作时才起作用。跑步。
  1. There is no possibility. You need two service contracts - one for MSMQ and one for HTTP.
  2. 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.
  3. 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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文