MessageQueueTransactionType MessageQueueTransactionType MessageQueueTransactionType MessageQueueTransactionType Enum

定義

指定訊息佇列交易型別。Specifies the type of a Message Queuing transaction.

public enum class MessageQueueTransactionType
[System.Serializable]
public enum MessageQueueTransactionType
type MessageQueueTransactionType = 
Public Enum MessageQueueTransactionType
繼承
MessageQueueTransactionTypeMessageQueueTransactionTypeMessageQueueTransactionTypeMessageQueueTransactionType
屬性

欄位

Automatic Automatic Automatic Automatic 1

Microsoft Transaction Server (MTS) 或 COM+ 1.0 服務所使用的交易型別。A transaction type used for Microsoft Transaction Server (MTS) or COM+ 1.0 Services. 如果已經有一個 MTS 交易內容,在傳送或接收訊息時將會使用它。If there is already an MTS transaction context, it will be used when sending or receiving the message.

None None None None 0

作業不是可交易的。Operation will not be transactional.

Single Single Single Single 3

單一內部交易所使用的交易型別。A transaction type used for single internal transactions.

備註

MessageQueue當您使用Send類別之或Receive ReceiveById 方法(ReceiveByCorrelationId包括和) 的多載來讀取或寫入訊息時, 您可以指定要如何與進行互動。 transactionType佇列.When you read or write a message using an overload of the MessageQueue class's Send or Receive methods (including ReceiveById and ReceiveByCorrelationId) that takes a transactionType parameter, you can specify how you are interacting with the queue. Automatic可讓您從外部交易傳送和接收 (例如當您與資料庫應用程式互動時), 而Single用於單一內部訊息佇列交易。Automatic enables you to send and receive from external transactions (such as when you are interacting with database applications), while Single is used for single internal Message Queuing transactions.

None可讓您從交易外部的交易式佇列接收訊息, 或將交易式訊息傳送至非交易式佇列。None enables you to receive a message from a transactional queue outside of a transaction or send a transactional message to a non-transactional queue. 例如, 當您在單一交易內路由傳送數個訊息時, 這會很有用。This is useful, for example, when routing several messages sent within a single transaction.

如果您想要使用內部訊息佇列交易 (而不是單一內部交易) 來傳送或接收訊息, 請建立MessageQueueTransaction類別的實例, 並將它傳遞至SendReceive方法的多載, 以接受transaction參數, 而不是採用transactionType參數的參數。If you want to send or receive a message using an internal Message Queuing transaction but not a single internal transaction, create an instance of the MessageQueueTransaction class and pass it into an overload of the Send or Receive methods that takes a transaction parameter rather than one that takes a transactionType parameter.

適用於

另請參閱