DefaultPropertiesToSend.TimeToBeReceived Property


Gets or sets the time limit for the message to be retrieved from the destination queue.

 property TimeSpan TimeToBeReceived { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan TimeToBeReceived { get; set; }
member this.TimeToBeReceived : TimeSpan with get, set
Public Property TimeToBeReceived As TimeSpan

Property Value

The total time, in seconds, for a sent message to be received from the destination queue. The default is InfiniteTimeout.



The TimeToBeReceived property specifies the total time in seconds for a sent message to be received from the destination queue. This time limit includes the time spent getting to the destination queue, plus the time spent waiting in the queue before the message is retrieved by an application.


When using dependent client computers, synchronize the clock on the client computer with the clock on the server running Message Queuing. If the two clocks are not synchronized, you might see unpredictable behavior when sending messages when TimeToBeReceived is not InfiniteTimeout.

If the TimeToBeReceived interval expires before the message is removed from the queue, the Message Queuing application discards the message. The message is either sent to the dead-letter queue, if the message's UseDeadLetterQueue property is set to true, or ignored, if UseDeadLetterQueue is false. If TimeToBeReceived is less than TimeToReachQueue, TimeToBeReceived takes precedence.

The message's AcknowledgeType property can be set to request that Message Queuing send a negative acknowledgment message back to the sending application if the message is not retrieved before the timer expires.


If you have specified to receive TimeToReachQueue negative acknowledgments, you will not receive them when the value of TimeToBeReceived is less than the value of TimeToReachQueue.

When several messages are sent in a transaction, Message Queuing uses the value of the first message's TimeToBeReceived property.

Applies to

See also