vavrtom commented on a change in pull request #36: QPID-8361: [Broker-J] Create 
a developer guide for Qpid Broker-J
URL: https://github.com/apache/qpid-broker-j/pull/36#discussion_r326028177
 
 

 ##########
 File path: doc/developer-guide/src/main/markdown/architecture.md
 ##########
 @@ -408,6 +409,45 @@ There are several store provider implementations:
 
 These interfaces are pluggable.
 
+## Messaging Transactions
+
+Multiple messages can be consumed or/and published as a single atomic 
operation within messaging transaction.
+The transaction is usually initiated and discharged (committed or rolled back) 
on client side, but, `Broker`
+can also use messaging transactions for performing operations on group of 
messages in atomic way, for example,
+moving/copying messages between queues, deleting messages from queue using 
management interfaces, etc.
+
+An interface `ServerTransaction` represents messaging transaction on broker 
side. The following operations
+can be invoked as part of messaging transactions:
+
+ * `dequeue` - dequeue message or collection of messages
+ * `enqueue` - enqueue message into a `TransactionLogResource` or collection 
of `BaseQueue`
+ * `commit` - commit transaction
+ * `rollback` - rollback transaction
+ * `addPostTransactionAction` - an auxiliary operation to add some 
post-transactional work, which is executed after
+    transaction is discharged
+
+`LocalTransaction` is a concrete implementation of `ServerTransaction` which 
is responsible for performing messaging
+transaction. It delegates transactional operations to `Transaction` object 
provided by `MesssageStore`. Each message
+store type has its own implementation of `Transaction`.
+
+The class diagram below illustrates the transactional model of Qpid Broker-J.
+
+![Transactions](images/transactions.png)
+
+As per diagram, apart from `LocalTransaction`, there are three other 
implementations of `ServerTransaction`.
+
+ * `DistributedTransaction` is used to run distributed transaction (for AMQP 
protocol 0-10)
+ * `AutoCommitTransaction` is used to model auto-commit transaction 
functionality
+ * `AsyncAutoCommitTransaction` is used to model auto-commit transaction 
functionality
+    with asynchronous discharge (i.e., the caller does not wait for finish of 
transaction discharge and proceed
+    with invocation of next operations, but, the transaction eventually get 
discharged).
+
+`AsyncAutoCommitTransaction` is used to invoke enueueing and dequeueing 
operations when `client`
 
 Review comment:
   Typo in word 'enueueing'

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to