Message.TransactionId プロパティ
アセンブリ: System.Messaging (system.messaging.dll 内)



受信側アプリケーションは、メッセージが特定のトランザクションの一部として送信されたかどうかを確認するために TransactionId プロパティを使います。トランザクション ID は、送信元コンピュータの ID (最初の 16 ビット) と、それに続く 4 バイトのトランザクション シーケンス番号で構成されます。
このプロパティは、メッセージ キュー Version 2.0 以降でだけ使用できます。
トランザクション シーケンス番号は永続的ではなく、220 を超えると再び最初から割り当てられるため、トランザクション ID が一意であるという保証はありません。メッセージ キューが保証することは、続いて発生するトランザクションの番号を異なるシーケンス番号にすることだけです。
トランザクションの境界を確認するために TransactionId プロパティと共に使用できるプロパティは、IsFirstInTransaction と IsLastInTransaction です。

メッセージの TransactionId プロパティの値を表示するコード例を次に示します。
// Display the value of the message's TransactionId property. // To view this property value, the queue's // MessageReadPropertyFilter.TransactionId property must be set to true // before the message is received. Console.WriteLine("Message.TransactionId: {0}", orderMessage.TransactionId);
// Display the value of the message's TransactionId property. // To view this property value, the queue's // MessageReadPropertyFilter.TransactionId property must be set to true // before the message is received. Console::WriteLine("Message.TransactionId: {0}", orderMessage->TransactionId);
// Display the value of the message's TransactionId property. // To view this property value, the queue's // MessageReadPropertyFilter.TransactionId property must be set to true // before the message is received. Console.WriteLine("Message.TransactionId: {0}", System.Convert.ToString(orderMessage.get_TransactionId()));


Windows 98, Windows 2000 SP4, Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からMessage.TransactionId プロパティを検索する場合は、下記のリンクをクリックしてください。

- Message.TransactionId プロパティのページへのリンク