다음을 통해 공유


PROPID_M_TIME_TO_REACH_QUEUE (Windows Embedded CE 6.0)

1/6/2010

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.

If this property is not set or if this property is set to LONG_LIVED or INFINITE, Message Queuing uses the enterprise-wide setting for the time-to-reach-queue interval.

This enterprise-wide setting can be adjusted by the Message Queuing administrator. By default, this setting equals 4 days for messages sent from the following types of computers:

  • Computers running MSMQ 3.0 in workgroup mode.
  • Clients running MSMQ 3.0 that belong to a completely new Windows .NET domain.
  • Clients running MSMQ 3.0 that join an existing domain provided weakened security was not enabled for that forest.

The default enterprise-wide setting for messages sent from a computer in a migrated enterprise and computers running MSMQ 1.0 or MSMQ 2.0 in Windows 2000 and Windows NT® 4.0 enterprises is 90 days.

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 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 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 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 offline.

Note

OS versions prior to 2.12 require the MSMQ add-on pack.

Requirements

Header mq.h
Windows Embedded CE Windows CE 2.0 and later

See Also

Reference

MSMQ Properties
MQReceiveMessage
MQSendMessage
PROPID_M_ACKNOWLEDGE
PROPID_M_JOURNAL
PROPID_M_TIME_TO_BE_RECEIVED
MQMSGPROPS