MSMQ在实时系统中

时间:2022-06-27 15:15:57

Are there any limitation I should be aware of MSMQ?

我应该注意MSMQ有任何限制吗?

I want to use it to read and write messages, but a lot of messages.

我想用它来读取和写入消息,但是很多消息。

The numbers should be around 200,000 - 300,000 in one minute.

这些数字应该在一分钟内约为200,000 - 300,000。

Any thoughts? should it work?

有什么想法吗?它应该工作吗?

4 个解决方案

#1


5  

MSMQ is a queue, where the main benefits are to decouple the sender(s) and the receiver(s) of messages (e.g. receiving system can be offline).

MSMQ是一个队列,其主要好处是消除发送者和消息接收者(例如,接收系统可以离线)。

If guaranteed latency is a requirement, then I would look elsewhere (e.g. .NET remoting / WCF NetTCP binding, etc)

如果要求保证延迟,那么我会寻找其他地方(例如.NET远程处理/ WCF NetTCP绑定等)

That said, we have used MSMQ with low grade hardware with burst rates >> 500 messages per second, but in an integration (EAI) environment, with the benefits of MSMQ being:

也就是说,我们使用MSMQ和低级硬件,突发速率>>每秒500条消息,但在集成(EAI)环境中,MSMQ的好处是:

  • asynchronous - processes which send and receive messages can happen at different rates
  • 异步 - 发送和接收消息的进程可以以不同的速率发生

  • potentially transactional (e.g. under DTC, a message can be put on a queue and updated in a database, under a UOW)
  • 潜在的事务性(例如,在DTC下,消息可以放在队列中并在数据库中更新,在UOW下)

  • audited (journalling)
  • dead letter queue - i.e. if the receiver never picks up the message after a defined time period.
  • 死信队列 - 即如果接收者在规定的时间段之后从未接收到该消息。

Low latency was never a requirement - reliability and integrity were the main drivers.

低延迟绝不是必需的 - 可靠性和完整性是主要驱动因素。

#2


2  

For small, nontransactional messages, this could theoretically be possible, but it's at the upper end of what I've personally heard of. Stay away from transactional queues, though -- I seriously doubt you'll be able to get that kind of throughput on any realistic platform.

对于小的非事务性消息,理论上这可能是可能的,但它是我个人听到的最高端。但是,远离交易队列 - 我真的怀疑你能在任何现实的平台上获得那种吞吐量。

#3


1  

I've had problems with this kind of volume in MSMQ because of the dreaded Insufficient Resources problem.

由于可怕的资源不足问题,我在MSMQ中遇到了这种卷的问题。

It seems like this would be a rare occurrence, but it happened to me a few times.

这似乎是罕见的事情,但它发生在我身上几次。

#4


0  

Check out this article : link It says that MSMQ shouldn't be used as a storage product but used as a transport mechanism.

看看这篇文章:链接它说MSMQ不应该用作存储产品,而应该用作传输机制。

You could have services that read the messages from the queues and process them in a transactional way. Here (MSDN link) you can find some examples. Create a small sample, do some load tests, see if it works.

您可以使用服务从队列中读取消息并以事务方式处理它们。在这里(MSDN链接)你可以找到一些例子。创建一个小样本,进行一些负载测试,看看它是否有效。

#1


5  

MSMQ is a queue, where the main benefits are to decouple the sender(s) and the receiver(s) of messages (e.g. receiving system can be offline).

MSMQ是一个队列,其主要好处是消除发送者和消息接收者(例如,接收系统可以离线)。

If guaranteed latency is a requirement, then I would look elsewhere (e.g. .NET remoting / WCF NetTCP binding, etc)

如果要求保证延迟,那么我会寻找其他地方(例如.NET远程处理/ WCF NetTCP绑定等)

That said, we have used MSMQ with low grade hardware with burst rates >> 500 messages per second, but in an integration (EAI) environment, with the benefits of MSMQ being:

也就是说,我们使用MSMQ和低级硬件,突发速率>>每秒500条消息,但在集成(EAI)环境中,MSMQ的好处是:

  • asynchronous - processes which send and receive messages can happen at different rates
  • 异步 - 发送和接收消息的进程可以以不同的速率发生

  • potentially transactional (e.g. under DTC, a message can be put on a queue and updated in a database, under a UOW)
  • 潜在的事务性(例如,在DTC下,消息可以放在队列中并在数据库中更新,在UOW下)

  • audited (journalling)
  • dead letter queue - i.e. if the receiver never picks up the message after a defined time period.
  • 死信队列 - 即如果接收者在规定的时间段之后从未接收到该消息。

Low latency was never a requirement - reliability and integrity were the main drivers.

低延迟绝不是必需的 - 可靠性和完整性是主要驱动因素。

#2


2  

For small, nontransactional messages, this could theoretically be possible, but it's at the upper end of what I've personally heard of. Stay away from transactional queues, though -- I seriously doubt you'll be able to get that kind of throughput on any realistic platform.

对于小的非事务性消息,理论上这可能是可能的,但它是我个人听到的最高端。但是,远离交易队列 - 我真的怀疑你能在任何现实的平台上获得那种吞吐量。

#3


1  

I've had problems with this kind of volume in MSMQ because of the dreaded Insufficient Resources problem.

由于可怕的资源不足问题,我在MSMQ中遇到了这种卷的问题。

It seems like this would be a rare occurrence, but it happened to me a few times.

这似乎是罕见的事情,但它发生在我身上几次。

#4


0  

Check out this article : link It says that MSMQ shouldn't be used as a storage product but used as a transport mechanism.

看看这篇文章:链接它说MSMQ不应该用作存储产品,而应该用作传输机制。

You could have services that read the messages from the queues and process them in a transactional way. Here (MSDN link) you can find some examples. Create a small sample, do some load tests, see if it works.

您可以使用服务从队列中读取消息并以事务方式处理它们。在这里(MSDN链接)你可以找到一些例子。创建一个小样本,进行一些负载测试,看看它是否有效。