odbozhou commented on a change in pull request #3718:
URL: https://github.com/apache/rocketmq/pull/3718#discussion_r781789410



##########
File path: 
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java
##########
@@ -197,20 +208,21 @@ public DefaultMQProducer(final String producerGroup, 
RPCHook rpcHook) {
     /**
      * Constructor specifying namespace, producer group and RPC hook.
      *
-     * @param namespace Namespace for this MQ Producer instance.
+     * @param namespace     Namespace for this MQ Producer instance.
      * @param producerGroup Producer group, see the name-sake field.
-     * @param rpcHook RPC hook to execute per each remoting command execution.
+     * @param rpcHook       RPC hook to execute per each remoting command 
execution.
      */
     public DefaultMQProducer(final String namespace, final String 
producerGroup, RPCHook rpcHook) {
         this.namespace = namespace;
         this.producerGroup = producerGroup;
         defaultMQProducerImpl = new DefaultMQProducerImpl(this, rpcHook);
+        produceAccumulator = 
MQClientManager.getInstance().getOrCreateProduceAccumulator(this);

Review comment:
       Should it be judged that autoBatch is true when creating 
produceAccumulator?

##########
File path: 
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java
##########
@@ -233,18 +245,19 @@ public DefaultMQProducer(final String producerGroup, 
boolean enableMsgTrace, fin
      * Constructor specifying namespace, producer group, RPC hook, enabled 
msgTrace flag and customized trace topic
      * name.
      *
-     * @param namespace Namespace for this MQ Producer instance.
-     * @param producerGroup Producer group, see the name-sake field.
-     * @param rpcHook RPC hook to execute per each remoting command execution.
-     * @param enableMsgTrace Switch flag instance for message trace.
+     * @param namespace            Namespace for this MQ Producer instance.
+     * @param producerGroup        Producer group, see the name-sake field.
+     * @param rpcHook              RPC hook to execute per each remoting 
command execution.
+     * @param enableMsgTrace       Switch flag instance for message trace.
      * @param customizedTraceTopic The name value of message trace topic.If 
you don't config,you can use the default
-     * trace topic name.
+     *                             trace topic name.
      */
     public DefaultMQProducer(final String namespace, final String 
producerGroup, RPCHook rpcHook,
         boolean enableMsgTrace, final String customizedTraceTopic) {
         this.namespace = namespace;
         this.producerGroup = producerGroup;
         defaultMQProducerImpl = new DefaultMQProducerImpl(this, rpcHook);
+        produceAccumulator = 
MQClientManager.getInstance().getOrCreateProduceAccumulator(this);

Review comment:
       the same as above

##########
File path: 
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java
##########
@@ -296,6 +312,7 @@ public void start() throws MQClientException {
     @Override
     public void shutdown() {
         this.defaultMQProducerImpl.shutdown();
+        this.produceAccumulator.shutdown();

Review comment:
       the same as above




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


Reply via email to