mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
fix #709
This commit is contained in:
parent
82e61945af
commit
265400ff5a
@ -22,6 +22,7 @@ import java.util.Map;
|
||||
import org.apache.rocketmq.acl.common.AclClientRPCHook;
|
||||
import org.apache.rocketmq.acl.common.SessionCredentials;
|
||||
import org.apache.rocketmq.client.producer.DefaultMQProducer;
|
||||
import org.apache.rocketmq.common.UtilAll;
|
||||
import org.apache.rocketmq.remoting.RPCHook;
|
||||
import org.apache.rocketmq.spring.autoconfigure.RocketMQProperties;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
@ -126,8 +127,8 @@ public class RocketMQMessageChannelBinder extends
|
||||
mergedProperties.isEnableMsgTrace(),
|
||||
mergedProperties.getCustomizedTraceTopic());
|
||||
producer.setVipChannelEnabled(false);
|
||||
producer.setInstanceName(
|
||||
RocketMQUtil.getInstanceName(rpcHook, destination.getName()));
|
||||
producer.setInstanceName(RocketMQUtil.getInstanceName(rpcHook,
|
||||
destination.getName() + "|" + UtilAll.getPid()));
|
||||
}
|
||||
else {
|
||||
producer = new DefaultMQProducer(producerGroup);
|
||||
|
@ -31,6 +31,7 @@ import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently;
|
||||
import org.apache.rocketmq.client.consumer.listener.MessageListenerOrderly;
|
||||
import org.apache.rocketmq.client.consumer.rebalance.AllocateMessageQueueAveragely;
|
||||
import org.apache.rocketmq.client.exception.MQClientException;
|
||||
import org.apache.rocketmq.common.UtilAll;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.apache.rocketmq.remoting.RPCHook;
|
||||
import org.apache.rocketmq.spring.annotation.ConsumeMode;
|
||||
@ -206,7 +207,8 @@ public class RocketMQListenerBindingContainer
|
||||
new AllocateMessageQueueAveragely(),
|
||||
rocketBinderConfigurationProperties.isEnableMsgTrace(),
|
||||
rocketBinderConfigurationProperties.getCustomizedTraceTopic());
|
||||
consumer.setInstanceName(RocketMQUtil.getInstanceName(rpcHook, topic));
|
||||
consumer.setInstanceName(RocketMQUtil.getInstanceName(rpcHook,
|
||||
topic + "|" + UtilAll.getPid()));
|
||||
consumer.setVipChannelEnabled(false);
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user