This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Transactional Message Processing
The NGWS frameworks MessageQueue component gives you the option of sending and receiving messages transactionally. When you send a transactional message, you group a set of related messages into a transaction. All the messages are either delivered together in the order in which they were sent (a committed transaction), or automatically not sent at all if any problems occur (an aborted transaction). Transactional processing allows you to ensure that the messages in a transaction are delivered in order, are delivered only once, and are successfully retrieved from the destination queue.
There are two main types of transactions you can create from your applications:
- Internal transactions are transactions sent between two or more Message Queuing resources. Because no non-Message Queuing (MSMQ) resources are involved in the transaction, the entire transaction is governed by the Message Queuing engine. These transactions are faster and have a simpler programming model than external transactions.
- External transactions are used if resources other than Message Queuing are needed to provide part of the transaction. Message Queuing is then used as a resource manager under the control of Microsoft's Distributed Transaction Coordinator (DTC). Using the DTC as the transaction coordinator for Message Queuing, you can create transaction-based applications and ensure that all operations either succeed or fail as a unit. For example, a Message Queuing application can send a message and update a database in the same transaction. The DTC ensures that either both actions succeed or neither action is executed.
See Also
Reading and Receiving Messages | Creating a Transactional Queue | Sending Messages Within an Internal Transaction