Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MessageQueue.Transactional Property

Gets a value indicating whether the queue accepts only transactions.

[Visual Basic]
Public ReadOnly Property Transactional As Boolean
public bool Transactional {get;}
public: __property bool get_Transactional();
public function get Transactional() : Boolean;

Property Value

true if the queue accepts only messages sent as part of a transaction; otherwise, false.


Exception Type Condition
MessageQueueException An error occurred when accessing a Message Queuing API.


Transactional messaging refers to the coupling of several related messages into a single transaction. Sending messages as part of a transaction ensures that the messages are delivered in order, delivered only once, and successfully retrieved from their destination queue.

If a queue is transactional, it accepts only messages that are sent as part of a transaction. However, a nontransactional message can be sent or received from a local transaction queue without explicitly using transactional Begin, Commit, and Abort syntax. If a nontransactional message is sent to a transactional queue, this component creates a single-message transaction for it, except in the case of referencing a queue on a remote computer using a direct format name. In this situation, if you do not specify a transaction context when sending a message, one is not created for you and the message will be sent to the dead-letter queue.

Note   If you send a nontransactional message to a transactional queue, you will not be able to roll back the message in the event of an exception.
[Visual Basic] Note    MessageQueueTransaction is threading apartment aware, so if your apartment state is STA, you cannot use the transaction in multiple threads. Visual Basic sets the state of the main thread to STA, so you must apply the MTAThreadAttribute in the Main subroutine. Otherwise, sending a transactional message using another thread throws a MessageQueueException exception. You apply the MTAThreadAttribute by using the following fragment.
[Visual Basic] 
public sub Main()

The following table shows whether this property is available in various Workgroup modes.

Workgroup Mode Available
Local computer Yes
Local computer + direct format name Yes
Remote computer No
Remote computer + direct format name No


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace | Begin | Commit | Abort | Message.TransactionId | Message.IsFirstInTransaction | IsLastInTransaction

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.