MSMQ的主要优点 [英] Key Benefits of MSMQ
问题描述
我见过许多套接字应用程序,其中有使用MSMQ的。但是,当我在细节去,我认为我们可以做到这一点没有MSMQ还,所以我想知道什么是MSMQ的关键优势。为什么有人要使用MSMQ在自己的应用程序。
I have seen many socket application in which there is use of MSMQ. But when I go in details I think that we can do it without MSMQ also, so I want to know what is key benefit of MSMQ. Why should someone use MSMQ in his own application.
推荐答案
MSMQ是很大一块的Windows。它基本上是一个面向消息的中间件是有很大帮助的一些软件架构。
MSMQ is a great piece of Windows. It is basically a message-oriented middleware that helps a lot in some software architectures.
这主要是针对异步消息处理的常见用例:你有一个服务服务1
传达(发送消息)与软件的另一部分建筑学,说客服2
This mainly addresses the common use case of asynchronous message processing: you have a service Service1
that communicates (send messages) with another part of your software architecture, say Service2
.
主要问题:如果客服2
突然变得不可用?将邮件丢失?
如果你使用MSMQ也不会:服务1
将邮件发送到一个队列,客服2
将,出列可用时
Main problem: what if Service2
becomes suddenly unavailable? Will messages be lost?
If you use MSMQ it won't: Service1
will send messages into a queue, and Service2
will dequeue when it is available.
MSMQ将解决以下常见问题:
MSMQ will resolve following common issues:
- 服务暂时不可用:消息都坚持在磁盘上并在服务再次可用将离队,因此没有消息丢失
- ,因为它是完全异步,它会帮助很多的情况下,准时高峰负荷:您
客服2
重负载下也不会死,它只会出队和处理的消息,一个接有一个
- temporary unavailability of a service: messages are persisted on the disk and will be dequeued when the service becomes available again, so no messages are lost
- as it's fully asynchronous, it'll help a lot in case of punctual peak load: your
Service2
won't die under the heavy load, it'll just dequeue and process messages, one after one
MSMQ的优点VS另一种面向消息的中间件:
Pros of MSMQ vs another message-oriented middleware:
- 免费和内置(附带Windows)
- 指示灯
- 好与其他Microsoft集成产品(比如还有就是
System.Messaging
命名空间的.Net处理MSMQ) - 监控功能(使用性能计数器:每秒接收的消息数...)
- 事务性队列
- 在磁盘的持久性等等消息都不会丢失
- 可以通过网络(远程队列)
- free and built-in (shipped with Windows)
- light
- good integration with other Microsoft products (for instance there is the
System.Messaging
namespace in .Net to deal with MSMQ) - monitoring capabilities (using perfmon counters: number of message received per second...)
- transactional queues
- persistence on disk so messages are never lost
- available through the network (remote queues)
这篇关于MSMQ的主要优点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!