Message timers

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Message timers

Message Queuing provides two timers to help you maintain better control of your messages: a time-to-reach-queue and a time-to-be-received timer.

The time-to-reach-queue (TTRQ) timer determines how long a message has to reach the queue manager of the target queue. Typically, this timer is set to a value less than the time-to-be-received setting.

The time-to-be-received timer determines how long a message remains in the system, starting from the time the message is sent to the time it is removed from the target queue.

Through the Computer Management snap-in, you can set the TTRQ value. If you do not specify a TTRQ value, the following default settings apply:

  • 4 days for messages sent from the following types of computers:

    • Computers running Message Queuing 3.0 in workgroup mode.

    • Clients running Message Queuing 3.0 that belong to a completely new Windows Server 2003 domain.

    • Clients running Message Queuing 3.0 that join an existing domain provided weakened security was not enabled for that forest.

  • 90 days for messages sent from the following types of computers:

    • Any computer in a migrated enterprise and computers running MSMQ 1.0 or MSMQ 2.0 in Windows 2000 and Windows NT 4.0.

For information on how to set the lifetime of messages on your network, see Set the default lifetime for messages.

The default setting for the time-to-be-received timer is that no limit is set.

When both timers are used and the time-to-be-received timer is set to a smaller value than the TTRQ timer, the time-to-be-received timer takes precedence. For example, if the time-to-be-received timer is set to 3 minutes and the TTRQ timer is set to 10 minutes, Message Queuing will discard the message after 3 minutes. A message is not allowed to remain in the system longer than the time specified by the time-to-be-received timer.

When a timer expires, Message Queuing discards the message. However, Message Queuing can also send a copy of the discarded message to the applicable dead-letter queue or it can send a negative acknowledgment message to an administration queue.

Discarded messages can be sent to dead-letter queues if the journal property of the message specifies a dead-letter queue. Copies of nontransactional messages are sent to the dead-letter queue on the computer where the timer expired. Copies of transactional messages are sent to the transactional dead-letter queue on the source machine.

Acknowledgment messages are returned if a timer expires and the acknowledgment property of the message specifies full or negative acknowledgments. Message Queuing sends the appropriate negative acknowledgment message to the administration queue specified by the message.