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/10/29 11:13:24 UTC

[GitHub] [rocketmq-spring] cy18cn opened a new issue #162: 2.0.3 not support access-channel CLOUD in transactionProducer

cy18cn opened a new issue #162: 2.0.3 not support access-channel CLOUD in transactionProducer
URL: https://github.com/apache/rocketmq-spring/issues/162
 
 
   I use accessChannel to migrate my mq service to aliyun, but i found createTransactionMQProducer not set this properties. My service always get error "org.apache.rocketmq.client.exception.MQClientException: No route info of this topic" when i send transaction mq.
   ```
   private TransactionMQProducer createTransactionMQProducer(String name,
                                                                 RocketMQLocalTransactionListener transactionListener,
                                                                 ExecutorService executorService, RPCHook rpcHook) {
           Assert.notNull(producer, "Property 'producer' is required");
           Assert.notNull(transactionListener, "Parameter 'transactionListener' is required");
           TransactionMQProducer txProducer;
           if (Objects.nonNull(rpcHook)) {
               txProducer = new TransactionMQProducer(name, rpcHook);
               txProducer.setVipChannelEnabled(false);
               txProducer.setInstanceName(RocketMQUtil.getInstanceName(rpcHook, name));
           } else {
               txProducer = new TransactionMQProducer(name);
           }
           txProducer.setTransactionListener(RocketMQUtil.convert(transactionListener));
   
           txProducer.setNamesrvAddr(producer.getNamesrvAddr());
           if (executorService != null) {
               txProducer.setExecutorService(executorService);
           }
   
           txProducer.setSendMsgTimeout(producer.getSendMsgTimeout());
           txProducer.setRetryTimesWhenSendFailed(producer.getRetryTimesWhenSendFailed());
           txProducer.setRetryTimesWhenSendAsyncFailed(producer.getRetryTimesWhenSendAsyncFailed());
           txProducer.setMaxMessageSize(producer.getMaxMessageSize());
           txProducer.setCompressMsgBodyOverHowmuch(producer.getCompressMsgBodyOverHowmuch());
           txProducer.setRetryAnotherBrokerWhenNotStoreOK(producer.isRetryAnotherBrokerWhenNotStoreOK());
   
           return txProducer;
       }
   ```

----------------------------------------------------------------
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