Gets or sets the maximum amount of time for the message to reach the queue.
Assembly: System.Messaging (in System.Messaging.dll)
If the interval specified by the property expires before the message reaches its destination, Message Queuing discards the message in one of two ways. If the message's UseDeadLetterQueue property is true, the message is sent to the dead-letter queue. If UseDeadLetterQueue is false, the message is ignored
You can set he message's AcknowledgeType property to request that Message Queuing send a negative acknowledgment message back to the sending application if the message does not arrive before the timer expires.
If the property is set to 0 seconds, Message Queuing tries once to send the message to its destination—if the queue is waiting for the message. If the queue is local, the message always reaches it.
When several messages are sent in a single transaction, Message Queuing uses the property of the first message.
The following code example gets and sets the value of a message's property.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.