Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I make MSMQ automatically expire messages if they have been waiting in a queue for longer than a period of time, say, 30 minutes?

We don't have control of the system that creates these messages in order to set the MaxTimeToReceive property of the messages.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can't.

Timeouts are always set when the application creates the message. The value is either provided by the code or taken from the sender's queue manager's defaults. Once set and sent, that's it.

If you have no control of the system sending the messages then you're out of luck and will have to provide a manual method of cleaning up old messages.

John Breakwell

share|improve this answer
Hmm, I thought so. Thank you –  Nishkar Apr 20 '11 at 16:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.