xiao-ma-nong commented on issue #2540:
URL: https://github.com/apache/rocketmq/issues/2540#issuecomment-753463844


   > > java.lang.NoSuchMethodError: 
org.apache.rocketmq.spring.core.RocketMQTemplate.sendMessageInTransaction(Ljava/lang/String;Lorg/springframework/messaging/Message;Ljava/lang/Object;)Lorg/apache/rocketmq/client/producer/TransactionSendResult;
   > > at 
com.cainaer.common.rocketmq.utils.RocketMqUtil.sendMessageInTransaction(RocketMqUtil.java:74)
   > > at 
com.cainaer.netty.service.impl.NettyServiceImpl.shopRejectOrders(NettyServiceImpl.java:143)
   > > at com.cainaer.netty.config.ChatHandler.typeHandle(ChatHandler.java:80)
   > > at com.cainaer.netty.config.ChatHandler.channelRead0(ChatHandler.java:44)
   > > at com.cainaer.netty.config.ChatHandler.channelRead0(ChatHandler.java:25)
   > > 换了之后,把全部的工作都做了,还是就报以上的错误
   > 
   > 像是pom依赖的问题。另外最早的错误应该定义了@RocketMQLocalTransactionListener方法吧
   
   这个监听 是有了注解
   
   **发送 事务方法**
    TransactionSendResult sendResult = 
rocketMQTemplate.sendMessageInTransaction(topic, message, tag);
   
   
   **事务监听**
   @RocketMQTransactionListener(txProducerGroup = "xxx")
   public class RejectOrdersMqListener implements 
RocketMQLocalTransactionListener {
   }
   
   
   我找了源码,也没有找到帮助
   
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to