You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/08/21 03:16:37 UTC

[GitHub] [rocketmq-spring] lazycece opened a new issue #126: 事务消息不会进行回查

lazycece opened a new issue #126: 事务消息不会进行回查
URL: https://github.com/apache/rocketmq-spring/issues/126
 
 
   
   使用`RocketMQTransactionListener`标注执行本地事务和消息回查,在模拟消息回查功能的时候不会收到回查请求。
   > rocketmq-spring's version: 2.0.3
   
   ```java
   @Slf4j
   @RocketMQTransactionListener(txProducerGroup = "tx-group")
   public class TransactionListenerImpl implements RocketMQLocalTransactionListener {
   
       @Override
       public RocketMQLocalTransactionState executeLocalTransaction(Message msg, Object arg) {
   
           // 模拟本地事务不通过
           log.info("============== executeLocalTransaction");
   
           return RocketMQLocalTransactionState.UNKNOWN;
       }
   
       @Override
       public RocketMQLocalTransactionState checkLocalTransaction(Message msg) {
   
           // 模拟回查本地事务
           log.info("============== checkLocalTransaction");
   
           // todo 收不到回查消息
   
           return RocketMQLocalTransactionState.COMMIT;
       }
   
   ```
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services