Distributed Transaction-eXtended (DTX) is a financial-grade distributed transaction middleware from Ant Group. It ensures eventual consistency for business activities in large-scale distributed environments. Ant Group uses DTX for core financial services, such as transactions, transfers, and red envelopes, to support financial operations for hundreds of millions of users.
DTX integrates with other Ant Group middleware products. These include service frameworks such as SOFABoot, Spring Cloud, and Dubbo, data sources such as data access proxies, RDS, MySQL, and OceanBase, and message queues. This integration makes it easy to implement service-level transactions, cross-database transactions, message transactions, and various combinations.
A distributed transaction involves three roles: an initiator, participants, and a transaction manager.
Initiator: The role that starts a distributed transaction. It calls the services of participants to include them in the transaction and decides whether to commit or roll back the entire transaction. A distributed transaction has only one initiator.
Participant: A role that provides a branch transaction service. When called by the initiator, a participant joins the distributed transaction as a branch. A distributed transaction can have multiple participants.
Transaction manager: An independent service that coordinates the distributed transaction. It creates records for the main transaction and each branch transaction. Based on the transaction's status, it calls the participants' commit or rollback methods.