The invention relates to a
transaction data recording method and a
transaction data playback method. The recording method comprises the following steps: a front-
end system sends a transaction requestto an ESC cloud terminal, asynchronously writes the transaction request into a local kafka cluster, and synchronizes the transaction request to a remote
data center through a MirorMaker
mirror image;if the local transaction recording compensation application successfully receives the ACK message, verifying the transaction
record according to the ACK message; the local ESC cloud terminal asynchronously writes a response message into the local kafka cluster after receiving the response of the back-end
service system, and creates a top-to-end
service system; the top-to-top is sent to the
server,and the top-to-top is sent to the
server. Persistence is carried out on the res message to a local
database, and the top-value-is obtained through the MirorMaker
mirror image. And the res message issynchronized to a remote
data center. According to the
transaction data recording method and the transaction data playback method, the data difference of
asynchronous data synchronization is made up,and the final consistency of the data can be guaranteed when remote fault switching is carried out.