PROPID_M_TIME_TO_REACH_QUEUE

This property specifies a time limit (in seconds) for the message to reach the queue.

  • Type Indicator
    VT_UI4
  • PROPVARIANT Field
    ulVal
  • Property Values
    Integer value (the default is LONG_LIVED).

Remarks

PROPID_M_TIME_TO_REACH_QUEUE sets the time-to-reach-queue timer of the message. If the time-to-reach-queue timer expires before the message reaches its destination, MSMQ discards the message, sending it to the dead-letter queue if the PROPID_M_JOURNAL property of the message is set to MQMSG_DEADLETTER.

MSMQ can also send a return negative acknowledgment message back to the sending application if the message does not arrive and the PROPID_M_ACKNOWLEDGE property of the message is set accordingly.

To set the time-to-reach-queue timer, specify PROPID_M_TIME_TO_REACH_QUEUE in the MQMSGPROPS structure and call MQSendMessage.

The default value LONG_LIVED is an enterprise-wide setting that can be adjusted by the MSMQ administrator. Typically, LONG_LIVED is set to 90 days. Although this timer can be set to INFINITE, MSMQ automatically uses the LONG_LIVED value in its place.

To find out how much time remains in the time-to-reach-queue timer, specify PROPID_M_TIME_TO_REACH_QUEUE in the MQMSGPROPS structure. Then call MQReceiveMessage and examine the returned value. A value of 0 indicates the timer has expired.

If the time-to-be-received and time-to-reach-queue timers are both specified, the time-to-be-received timer takes precedence over the time-to-reach-queue timer.

No matter what value PROPID_M_TIME_TO_REACH_QUEUE is set to (even if set to 0), MSMQ always gives each message one chance to reach its destination if the queue is waiting for the message. If the queue is local, the message always reaches the queue.

MSMQ uses the time-to-reach-queue timer of the first message when several messages are sent in a transaction.

When MSMQ creates an acknowledgment message, it always sets the time-to-reach-queue timer of the message to LONG_LIVED.

When a message is sent from an independent client computer, the time-to-reach-queue timer starts ticking as soon as the send operation succeeds, even if the client computer is currently offline.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack. Mq.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MQReceiveMessage, MQSendMessage, PROPID_M_ACKNOWLEDGE, PROPID_M_JOURNAL, PROPID_M_TIME_TO_BE_RECEIVED, MQMSGPROPS

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.