kangjiabang opened a new issue #1188: Tracer start failed when starting 
multiple MqProducer  in one  process
URL: https://github.com/apache/rocketmq/issues/1188
 
 
   i  want to use trace feature in 4.4.0.
   when i  init  two  defaultMQProducer , use  new 
DefaultMQProducer(producerId,true);
   then i  start to send  message to test trace, trace not  work well。
   
   i find  when producer start with trace on,it will  produce new  
AsyncTraceDispatcher,in  AsyncTraceDispatcher, it will invoke 
getAndCreateTraceProducer method.  
   
   `private DefaultMQProducer getAndCreateTraceProducer(RPCHook rpcHook) {
           DefaultMQProducer traceProducerInstance = this.traceProducer;
           if (traceProducerInstance == null) {
               traceProducerInstance = new DefaultMQProducer(rpcHook);
               
traceProducerInstance.setProducerGroup(TraceConstants.GROUP_NAME);
               traceProducerInstance.setSendMsgTimeout(5000);
               traceProducerInstance.setVipChannelEnabled(false);
               // The max size of message is 128K
               traceProducerInstance.setMaxMessageSize(maxMsgSize - 10 * 1000);
           }
           return traceProducerInstance;
       }`
   but the ProducerGroup  is same for all trace Producer . when i start two 
MQProducer  ,i will report error  like following .
   `throw new MQClientException("The producer group[" + 
this.defaultMQProducer.getProducerGroup()
                           + "] has been created before, specify another name 
please." + FAQUrl.suggestTodo(FAQUrl.GROUP_NAME_DUPLICATE_URL),
                           null);`

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


With regards,
Apache Git Services

Reply via email to