实现消息总线架构

发布于 2024-07-16 16:30:47 字数 216 浏览 5 评论 0原文

我目前正在公司做一个新的消息总线架构的分析和设计。 我过去曾尝试过 MSMQ 做类似的事情,效果很好,并且正在考虑为这个项目再次做同样的事情,但使用 WCF 作为 API,而不是使用 System.Messaging API。 有人在 WCF 中使用过 MSMQ 吗? 比 System.Messaging API 更容易使用吗? 使用 WCF 相对于 System.Messaging 有哪些好处,反之亦然?

I'm currently doing analysis and design for a new message bus architecture in my company. I have tried MSMQ to do something like this in the past and it works well and was thinking of doing the same thing again for this project but using WCF as the API instead of using the System.Messaging API. Has anyone had experience with MSMQ in WCF? Is it easier to use then the System.Messaging API? What would be some benefits of using WCF over System.Messaging or vice versa?

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

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

发布评论

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

评论(3

无风消散 2024-07-23 16:30:48

恕我直言,有很多优秀、灵活且经过验证的总线架构可供选择(NServiceBus公共交通Rhino 服务总线),实现您自己的服务总线将是一个很大的NIH。 这不是一项微不足道的任务。

Udi 在此消息中对此进行了很好的描述。

IMHO, with so many good, flexible and proven bus architectures to choose from (NServiceBus, Mass Transit, Rhino Service Bus), implementing your own would be a big NIH. It's not a trivial task.

Udi describes it very well in this message.

权谋诡计 2024-07-23 16:30:48

抱歉,来得太晚了,但希望我的答案对 MSMQ 4.0 用户有用(但不一定对更高版本的用户有用)。

WCF 队列 和 System.Messaging 都是 MSMQ API 的包装器。 WCF 更加复杂,但具有以下优点:

  • 应用程序业务流程的 OO 视图,而不是其通信管道。
  • 免费的端到端消息加密和身份验证。 System.Messaging 仅支持线路加密,不支持存储加密。
  • 如果您愿意,您可以在 IIS 中托管,而不是构建自己的自定义主机。
  • 免费消息关联。 这允许您自动将消息分组到会话中。
  • 免费的事务批处理。

Sorry, coming very late to this, but hopefully my answer is useful for MSMQ 4.0 users (but not necessarily useful to users of later versions).

Both WCF Queuing and System.Messaging are wrappers over the MSMQ APIs. WCF is more sophisticated and complex, but does have the following benefits:

  • An OO view of your application's business processes rather than its communication plumbing.
  • End-to-end message encryption and authentication for free. System.Messaging only supports encryption on the wire, not in the store.
  • If you wish, you can host within IIS rather than building your own custom host.
  • Message correlation for free. This allows you to group messages into sessions automatically.
  • Transactional batching for free.
傲影 2024-07-23 16:30:48

Apache ActiveMQ(开源)消息代理也有一个 .NET 客户端:

http://activemq.apache.org

与 Apache Camel 和 Apache ServiceMix 一起,可以轻松设置企业集成模式和企业服务总线系统。

the Apache ActiveMQ (open source) message broker also has a .NET client:

http://activemq.apache.org

Together with Apache Camel and Apache ServiceMix, enterprise integration patterns and enterprise service bus systems are easy to set up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文