简体   繁体   English

WCF + MSMQ 4:谁将消息从重试队列移回应用程序队列?

[英]WCF + MSMQ 4 : Who moves a message from retry queue back to the application queue?

This is a simple question, but I was not able to find an answer. 这是一个简单的问题,但我无法找到答案。

Suppose my message is placed to the retry queue (who creates the retry queue? Is it a WCF or a MSMQ service?) 假设我的消息被放置到重试队列(谁创建重试队列?它是WCF还是MSMQ服务?)

After 5 minutes (that's my retry delay) that message gets back to the application queue. 5分钟后(这是我的重试延迟)该消息返回到应用程序队列。

Question: who moves a message from retry queue to the application queue after the timeout? 问题:超时后谁将消息从重试队列移动到应用程序队列?

Bonus question: how the delay is being tracked? 奖金问题:如何跟踪延迟? Does a message get a "moved" timestamp and "retry" timestamp? 消息是否获得“移动”时间戳和“重试”时间戳?

WCF with MSMQ 4.0 does provides for automatic retry and poison message handling although Hugh's answer is correct for older versions of MSMQ. 使用MSMQ 4.0的WCF确实提供了自动重试和毒物消息处理,尽管Hugh的答案对于旧版本的MSMQ是正确的。

Edit from comments: On identifying the process that moves messages to the retry queues and back, I'd assume that its the MSMQ service itself since this is a new feature in MSMQ 4.0. 从评论编辑:在识别将消息移动到重试队列并返回的过程时,我假设它是MSMQ服务本身,因为这是MSMQ 4.0中的新功能。 WCF participates in the transaction that wraps all this activity and of course, handles messages place in the queue by MSMQ. WCF参与包装所有这些活动的事务,当然还有MSMQ处理队列中的消息。

WCF with the standard msmq bindings ( netMsmqBinding and msmqIntegrationBinding ) do not support retries. 具有标准msmq绑定的WCF( netMsmqBindingmsmqIntegrationBinding )不支持重试。 So in answer to your questions: 所以回答你的问题:

who creates the retry queue? 谁创建重试队列? - You do. - 你做。

who moves a message from retry queue to the application queue after the timeout? 超时后谁将消息从重试队列移动到应用程序队列? - You do. - 你做。

how the delay is being tracked? 如何跟踪延迟? - You have to do it. - 你必须这样做。

NServiceBus is open source and can use MSMQ for transport. NServiceBus是开源的,可以使用MSMQ进行传输。 This product provides retry functionality out of the box, but does not use WCF. 此产品提供开箱即用的重试功能,但不使用WCF。

UPDATE UPDATE

Above is valid for For MSMQ 3 and below. 以上内容适用于MSMQ 3及以下版本。

According to this article Handling Poison Messages MSMQ 4 provides few new features that allow an application to handle poison messages using subqueues. 根据这篇文章处理毒药消息 MSMQ 4提供了一些新功能, 允许应用程序使用子队列处理有害消息。 These features are: 这些功能是:

  • abort counter 中止柜台
  • move counter 移动柜台
  • ability to move messages between main queue and subqueues, as well as between subqueues. 能够在主队列和子队列之间以及子队列之间移动消息。

So it seems like actual move is handled by WCF, not MSMQ; 所以看起来实际的移动是由WCF处理的,而不是MSMQ; and MSMQ simply now has facilities to support poison messages and retries handling. 而且MSMQ现在只有支持有害消息和重试处理的工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM