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 2021/08/18 06:52:05 UTC

[GitHub] [rocketmq-externals] ni-ze opened a new issue #788: [Rocketmq-flink] Rocketmq client does not guaranteed to be closed properly.

ni-ze opened a new issue #788:
URL: https://github.com/apache/rocketmq-externals/issues/788


    
   ![image](https://user-images.githubusercontent.com/31175234/129850264-19ea2fd6-f628-4b3e-9039-2505f4431c4e.png)
   DefaultMQPullConsumer.start() in open method, and pull message in run method.
   
   DefaultMQPullConsumer.start() would create netty client and many other resources, It should guaranteed to be closed properly under any conditions.
   
   It is recommended to use as follows
   ```java
   DefaultMQPullConsumer consumer =null;
   try{
   //initializate
   ...
   
   //start
   consumer.start()
   
   //use
   ...
   
   
   } finally {
        if (consumer != null){
          consumer.shutdown();
     }
   }
   
   ```
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-externals] SteNicholas commented on issue #788: [Rocketmq-flink] Rocketmq client does not guaranteed to be closed properly.

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on issue #788:
URL: https://github.com/apache/rocketmq-externals/issues/788#issuecomment-901582108


   @ni-ze , `RocketMQSourceFunction` starts the `DefaultMQPullConsumer` in the `open()` method and closes the `DefaultMQPullConsumer` in the `close` method. This behavior could guarantee the `DefaultMQPullConsumer` to be closable.


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-externals] duhenglucky closed issue #788: [Rocketmq-flink] Rocketmq client does not guaranteed to be closed properly.

Posted by GitBox <gi...@apache.org>.
duhenglucky closed issue #788:
URL: https://github.com/apache/rocketmq-externals/issues/788


   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org