You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/11/23 07:54:18 UTC

[GitHub] [rocketmq-clients] lu010610 opened a new issue, #291: shutdownHook problems

lu010610 opened a new issue, #291:
URL: https://github.com/apache/rocketmq-clients/issues/291

   ClientImpl‘s Constructor 
   
   ```
   Runtime.getRuntime().addShutdownHook(new Thread(() -> {
               LOGGER.info("JVM shutdown hook is invoked, clientId={}, state={}", clientId, ClientImpl.this.state());
               ClientImpl.this.stopAsync().awaitTerminated();
           }));
   ```
   
   Whether this hook can be managed by the user?
   
   Is it possible to delete or add a parameter to control?
   
   


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

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


[GitHub] [rocketmq-clients] aaron-ai commented on issue #291: shutdownHook problems

Posted by GitBox <gi...@apache.org>.
aaron-ai commented on issue #291:
URL: https://github.com/apache/rocketmq-clients/issues/291#issuecomment-1342155281

   @lu010610 Could you create a PR to implement this feature? we welcome various contributions!


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

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


[GitHub] [rocketmq-clients] aaron-ai commented on issue #291: shutdownHook problems

Posted by GitBox <gi...@apache.org>.
aaron-ai commented on issue #291:
URL: https://github.com/apache/rocketmq-clients/issues/291#issuecomment-1326263736

   @lu010610 @lizhanhui got your point.
   
   how about managing the behavior here by providing a switch of enviroment variable/system properties.


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

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


[GitHub] [rocketmq-clients] lu010610 commented on issue #291: shutdownHook problems

Posted by GitBox <gi...@apache.org>.
lu010610 commented on issue #291:
URL: https://github.com/apache/rocketmq-clients/issues/291#issuecomment-1326363382

   > @lu010610 @lizhanhui got your point.
   > 
   > how about managing the behavior here by providing a switch of enviroment variable/system properties.
   
   that is ok !


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

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


[GitHub] [rocketmq-clients] aaron-ai closed issue #291: Java: Make it possible to control client shutdown in JVM shutdown hook

Posted by GitBox <gi...@apache.org>.
aaron-ai closed issue #291: Java: Make it possible to control client shutdown in JVM shutdown hook
URL: https://github.com/apache/rocketmq-clients/issues/291


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

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


[GitHub] [rocketmq-clients] aaron-ai commented on issue #291: Java: Make it possible to control client shutdown in JVM shutdown hook

Posted by GitBox <gi...@apache.org>.
aaron-ai commented on issue #291:
URL: https://github.com/apache/rocketmq-clients/issues/291#issuecomment-1366434986

   @lu010610 The default implementation of the shutdown hook in the client has been removed already. Thx for your feedback!


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

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


[GitHub] [rocketmq-clients] aaron-ai commented on issue #291: shutdownHook problems

Posted by GitBox <gi...@apache.org>.
aaron-ai commented on issue #291:
URL: https://github.com/apache/rocketmq-clients/issues/291#issuecomment-1325846840

   This hook is provided by JVM, so you could implement your own part.


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

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


[GitHub] [rocketmq-clients] lizhanhui commented on issue #291: shutdownHook problems

Posted by GitBox <gi...@apache.org>.
lizhanhui commented on issue #291:
URL: https://github.com/apache/rocketmq-clients/issues/291#issuecomment-1326202711

   > > This hook is provided by JVM, so you could implement your own part.
   > 
   > Of course I know this hook is provided by JVM.
   > 
   > For example, the sub class ProducerImpl.
   > 
   > In Spring, When JVM received kill signal, this hook will be executed and ProducerImpl will be closed now,
   > 
   > but I expect that when the spring bean is destroyed, we will invoke the ProducerImpl's close method.
   
   @aaron-ai This case makes sense. 


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

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


[GitHub] [rocketmq-clients] lu010610 commented on issue #291: shutdownHook problems

Posted by GitBox <gi...@apache.org>.
lu010610 commented on issue #291:
URL: https://github.com/apache/rocketmq-clients/issues/291#issuecomment-1326097770

   > This hook is provided by JVM, so you could implement your own part.
   
   Of course I know this hook is provided by JVM.
   
   For example, the sub class ProducerImpl.
   
   In Spring, When JVM received kill signal, this hook will be executed and ProducerImpl will be closed now,  
   
   but I expect that when the spring bean is destroyed, we will invoke the ProducerImpl's close method. 
   


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

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