4

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?)

After 5 minutes (that's my retry delay) that message gets back to the application queue.

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?

Charles
  • 50,943
  • 13
  • 104
  • 142
THX-1138
  • 21,316
  • 26
  • 96
  • 160

3 Answers3

2

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.

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. WCF participates in the transaction that wraps all this activity and of course, handles messages place in the queue by MSMQ.

Sixto Saez
  • 12,610
  • 5
  • 43
  • 51
  • Thanks for that - I wasn't aware of this new feature. – tom redfern Jan 26 '12 at 14:28
  • My client has been using it for over a year in a high volume eCommerce setting and its rock-solid. Saved their biscuits a time or two :) – Sixto Saez Jan 26 '12 at 14:53
  • I've seen that article, I am not clear though about "message is moved to a retry queue" - who is doing that? since retry parameters are defined on WCF binding, it feels like WCF (i.e. web service) is responsible for that, but at the same time retry is a feature of the MSMQ 4. That's where I am confused at. – THX-1138 Jan 26 '12 at 16:15
  • I don't know anything about the internals of moving messages to a retry queue but I'd guess that WCF is not involved in that process other than defining the re-try parameters. Since this is a new feature in MSMQ 4.0 then I'd assume all the message moving is done internally by MSMQ. WCF would be affected the transaction wrapping this processing and in "re-processing" of the message when it gets back in the regular queue. – Sixto Saez Jan 26 '12 at 16:32
  • I think that's a reasonable reasoning. Please put it in the answer. – THX-1138 Feb 02 '12 at 03:24
1

WCF with the standard msmq bindings (netMsmqBinding and msmqIntegrationBinding) do not support retries. 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. This product provides retry functionality out of the box, but does not use WCF.

UPDATE

Above is valid for For MSMQ 3 and below.

tom redfern
  • 30,562
  • 14
  • 91
  • 126
0

According to this article Handling Poison Messages MSMQ 4 provides few new features that allow an application to handle poison messages using subqueues. 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; and MSMQ simply now has facilities to support poison messages and retries handling.

THX-1138
  • 21,316
  • 26
  • 96
  • 160