MessagePropertyFilter.TransactionStatusQueue 属性

定义

获取或设置一个值,该值指示接收或查看消息时是否检索 TransactionStatusQueue 属性信息。

public:
 property bool TransactionStatusQueue { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgTransactionStatusQueue")]
public bool TransactionStatusQueue { get; set; }
[<System.Messaging.MessagingDescription("MsgTransactionStatusQueue")>]
member this.TransactionStatusQueue : bool with get, set
Public Property TransactionStatusQueue As Boolean

属性值

如果接收 TransactionStatusQueue 信息,则为 true;否则为 false。 默认值为 false

属性

示例

下面的代码示例演示如何使用 TransactionStatusQueue 属性。

// Set the queue's MessageReadPropertyFilter property to 
// enable the message's TransactionStatusQueue property.
queue->MessageReadPropertyFilter->
    TransactionStatusQueue = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's 
// TransactionStatusqueue->QueueName property.
Console::WriteLine(
    "Message.TransactionStatusqueue->QueueName: {0}", 
    orderMessage->TransactionStatusQueue->QueueName);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's TransactionStatusQueue property.
queue.MessageReadPropertyFilter.TransactionStatusQueue = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

// Display the value of the message's TransactionStatusQueue.QueueName
// property.
Console.WriteLine("Message.TransactionStatusQueue.QueueName: {0}",
    orderMessage.TransactionStatusQueue.QueueName);

注解

TransactionStatusQueue类的 Message 属性标识源计算机上的事务状态队列。 属性用于将确认消息发送回发送应用程序。 事务状态队列在接收发送到外部队列的事务消息时由连接器应用程序使用。

Microsoft 消息队列以外的队列系统中存在外部队列。 Microsoft 消息队列通过连接器应用程序与此类队列通信。

适用于

另请参阅