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/02/26 10:36:36 UTC

[GitHub] fangjian0423 commented on a change in pull request #48: [ISSUE-47] Support ACL & message trace feature

fangjian0423 commented on a change in pull request #48: [ISSUE-47] Support ACL & message trace feature
URL: https://github.com/apache/rocketmq-spring/pull/48#discussion_r260223027
 
 

 ##########
 File path: rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/core/RocketMQTemplate.java
 ##########
 @@ -587,11 +590,19 @@ public boolean createAndStartTransactionMQProducer(String txProducerGroup, Rocke
         return true;
     }
 
-    private TransactionMQProducer createTransactionMQProducer(String name, RocketMQLocalTransactionListener transactionListener,
-                                                              ExecutorService executorService) {
+    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 = new TransactionMQProducer(name);
+        TransactionMQProducer txProducer;
+        if (Objects.nonNull(rpcHook)) {
+            txProducer = new TransactionMQProducer(name, rpcHook);
+            txProducer.setVipChannelEnabled(false);
+            txProducer.setInstanceName(RocketMQUtil.getInstanceName(rpcHook, name));
 
 Review comment:
   Different instanceName is using for different ak/sk in multi listeners annotated by @RocketMQTransactionListener.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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