Distributed Transaction Five _ the final consistency _ exception flow based on reliable message
More Dry goodsDistributed transactions two distributed transaction processing three distributed transactions four _ final consistency based on reliable message distributed transaction Five _ based on reliable message final consistency _ exception flow Distributed transaction Six _ regular MQ queue Distributed transaction Seven _ idempotent design Distributed Transaction Eight _ reliable message final consistency scheme Distributed Transaction Nine _ the final conformance code based on reliable message distributed transaction 10_ maximum effort to inform the situation flexible transaction solution: TCC (two stage type, compensated) Alipay Distributed Transaction Services DTS one Distributed Transaction Service DTS two Distributed Transaction Services DTS three Alipay Distributed Transaction Services DTS Four
one, the exception point in the message delivery consistency process
Any link can be a problem. analysis of abnormal situation of message sending consistency
1. From the perspective of the active side application:
Abnormal conditions |
possible states |
Consistency |
Pre-Send message failed |
Message not in storage, business operation not performed (Possible cause: active application, network, message middleware, message store) |
Consistent |
The proactive app does not receive a return message store result after pre-sending the message |
(1) Message not in store, business operation not executed |
Consistent |
Ditto |
(2) The message is stored (pending confirmation) and the business operation is not executed |
Inconsistent |
Received a successful return of the message store, but failed to perform a business operation |
Message is stored (pending confirmation), business operation not executed |
Inconsistent |
2. Exception analysis for message delivery consistency
Abnormal conditions |
possible states |
Consistency |
Message middleware does not receive business action processing results from the active application |
(1) The message has been stored (pending confirmation), the business operation has not been executed (or the business operation error has been rolled back) |
Inconsistent |
Ditto |
(2) The message is stored (pending confirmation) and the business operation is successful |
Inconsistent |
Message middleware receives business operation results (success/failure), but fails to process message state in message store |
(1) The message has been stored (pending confirmation), the business operation has not been executed (or the business operation error has been rolled back) |
Inconsistent |
Ditto |
(2) The message is stored (pending confirmation) and the business operation is successful |
Inconsistent |
3. Summary of exception scenarios for message delivery consistency
Abnormal conditions |
Consistency |
Exception Handling Methods |
Message not in store, business operation not executed |
Consistent |
|
Message is stored (status pending), business operation not executed |
Inconsistent |
Confirm business Operation result, process message (delete message) |
Message in storage (status pending), business operation successful |
Inconsistent |
Confirm Business Operation results, process messages (update message status, perform message delivery) |
4. Exception handling for message delivery consistency