Question

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?

Was it helpful?

Solution 3

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.

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top