MSMQ与SQL Server Service Broker [英] MSMQ vs. SQL Server Service Broker

查看:121
本文介绍了MSMQ与SQL Server Service Broker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含三个部分的应用程序:

I have an application that consists of three parts:

  • 面向最终用户和业务合作伙伴的前端网上商店
  • 用于处理这些订单的订单管理系统
  • 技术数据库系统,用于处理所订购产品和服务的所有技术细节

如今,这些系统(位于单独的服务器上,并且由单独的团队开发)可以使用WCF Web服务进行互操作.

Today, those systems (which are on separate servers and being developed by separate teams) interoperate using WCF webservices.

此设置可以正常工作-只要所有服务器都已启动.他们不是-并非总是如此.

This setup up works fine - as long as all servers are up. Which they're not - not always, anyway.

因此,我开始考虑使用MSMQ或SQL Server Service Broker处理这些系统之间的通信-至少在涉及将订单存储到订单管理系统中的网上商店或订单管理系统发送时技术数据发送到技术数据库系统.

So I've started looking at using either MSMQ or SQL Server Service Broker to handle the communication between those systems - at least when it comes to the web shop storing an order into the order management system, or the order management system sending the technical data to the tech database system.

我希望在整个系统中实现更高的可靠性-即使订单管理后端暂时不可用,用户仍然可以下订单,并且不会丢失订单.

I'm hoping to achieve more reliability in the entire system - users can still place orders and those won't get lost, even if the order management backend is temporarily unavailable.

但是最大的问题是:MSMQ还是Service Broker?这三个系统都是基于Windows和.NET的,并且已经在三个单独的服务器上使用SQL Server.

But the big question is: MSMQ or Service Broker?? All three systems are Windows- and .NET based, and use SQL Server already - on three separate servers.

有人能说出(或反对)这两种技术之一的真实事实吗?您使用这两套技术的真实生活体验是什么?利弊.如果您可以从头开始-您会选择哪一个?还是您会完全选择其他东西(什么?)?

Does anyone have some solid, real-world facts that speak for (or against) one of those two technologies? What are your real-life experiences with those two sets of technologies? Pros and cons. If you could start from scratch - which one would you choose? Or would you pick something else (what?) entirely?

推荐答案

在不同的情况下,我都很好地使用了这两种方法.我的偏好是非常基本的:如果消息发送事件是由数据库事件触发的,则使用SQL Service Broker.如果事件在代码中,请使用消息队列.该首选项仅基于它更容易在触发事件的同一平台上进行设置.

I have used both, in different situations, equally well. My preference is really pretty basic: use SQL Service Broker if message sending event is triggered from a database event; Use message queue if event is in code. That preference is based just that it easier to setup on the same platform that will trigger the event.

这篇关于MSMQ与SQL Server Service Broker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆