DefaultPropertiesToSend.TimeToReachQueue 属性

定义

获取或设置消息到达队列的时间限制。Gets or sets the time limit for the message to reach the queue.

public:
 property TimeSpan TimeToReachQueue { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Messaging.Design.TimeoutConverter))]
[System.Messaging.MessagingDescription("MsgTimeToReachQueue")]
public TimeSpan TimeToReachQueue { get; set; }
[System.Messaging.MessagingDescription("MsgTimeToReachQueue")]
[System.ComponentModel.TypeConverter(typeof(System.Messaging.TimeoutConverter))]
public TimeSpan TimeToReachQueue { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Messaging.Design.TimeoutConverter))>]
[<System.Messaging.MessagingDescription("MsgTimeToReachQueue")>]
member this.TimeToReachQueue : TimeSpan with get, set
[<System.Messaging.MessagingDescription("MsgTimeToReachQueue")>]
[<System.ComponentModel.TypeConverter(typeof(System.Messaging.TimeoutConverter))>]
member this.TimeToReachQueue : TimeSpan with get, set
Public Property TimeToReachQueue As TimeSpan

属性值

TimeSpan

从发送消息的时间算起,消息到达目标队列的时间限制(以秒计)。The time limit in seconds for a message to reach the destination queue, from the time the message is sent. 默认值为 InfiniteTimeoutThe default is InfiniteTimeout.

属性

注解

如果该 TimeToReachQueue 时间间隔在消息到达其目标之前过期,则消息队列应用程序将丢弃该消息。If the TimeToReachQueue interval expires before the message reaches its destination, the Message Queuing application discards the message. 如果消息的 UseDeadLetterQueue 属性设置为 true ,或者如果为,则将消息发送到死信队列 UseDeadLetterQueue falseThe 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. 如果 TimeToReachQueue 大于,则 TimeToBeReceived TimeToBeReceived 优先。If TimeToReachQueue is greater than TimeToBeReceived, TimeToBeReceived takes precedence.

消息的 AcknowledgeType 属性可以设置为请求消息队列向发送应用程序发送否定确认消息(如果在计时器过期之前消息不会到达)。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 does not arrive before the timer expires.

如果 TimeToReachQueue 为0秒,则当队列正在等待消息时,消息队列将尝试将消息发送到其目标。If TimeToReachQueue is 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 the queue.

当在事务中发送多条消息时,消息队列将使用第一条消息的 TimeToReachQueue 属性的值。When several messages are sent in a transaction, Message Queuing uses the value of the first message's TimeToReachQueue property.

适用于

另请参阅