Code Monkey home page Code Monkey logo

mqtransactiontree's Introduction

MQTransactionTree

RocketMq的事务消息

MQ事务消息

发送事务消息为什么必须要实现回查 Check 机制?

    当步骤(1)中 Half 消息发送完成,但本地事务返回状态为 TransactionStatus.Unknow,
    或者应用退出导致本地事务未提交任何状态时,从 MQ Broker 的角度看,这条 Half 状态的消
    息的状态是未知的。因此 MQ Broker 会定期要求发送方能 Check 该 Half 状态消息,并上报
    其最终状态。

    Check 被回调时,业务逻辑都需要做些什么?
        MQ 事务消息的 check 方法里面,应该写一些检查事务一致性的逻辑。MQ 发送事务消息时
        需要实现 LocalTransactionChecker 接口,用来处理 MQ Broker 主动发起的本地事务
        状态回查请求;因此在事务消息的 Check 方法中,需要完成两件事情:
            (1) 检查该 Half 消息对应的本地事务的状态(commited or rollback);
            (2) 向 MQ Broker 提交该 Half 消息本地事务的状态

mqtransactiontree's People

Contributors

qiuqiuxiaomaomi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.