BingCoke opened a new issue, #5555: URL: https://github.com/apache/rocketmq/issues/5555
as we know when producer start,it will create a InstanceName with (pid+nanoTime) by default in ClientConfig.java  and then produce create a client Instance in MQClientManager.java  in ClientConfig.java  we will find instance by clientid that depends on instance name . so is look like instance and producer have one-to-one correspondence relation. Till this moment everything is OK, but produce will registerProducer after create MQClient. in MQClientInstance.java  It seems that we use a produceTable to manage producers,but as we know this Instance will never have the other producer because we create instance name with nano and that lead to all producers will get their own instance! And MQClientInstance has fields to manager consumer and producer.  So it is seems that it is designed for managing consumer and producer together because the producerTable and consumerTable will be created by default when instance is created. So I think is not a good idea to use PID + nano to build a producer or consumer.It's enough to manage producer and consumer with one MQClientInstance. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
