You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "lpcy (via GitHub)" <gi...@apache.org> on 2023/10/11 10:57:17 UTC

[I] How to achieve graceful shutdown after integrating Rocketmq and Dubbo? [dubbo]

lpcy opened a new issue, #13185:
URL: https://github.com/apache/dubbo/issues/13185

   I have a complex application scenario that includes both Dubbo and Rocketmq consumers, based on the Spring environment. Dubbo has both services and references. At present, when the program is stopped, the Rocketmq consumer will report an error due to the Dubbo being stopped. Can it be implemented to stop the dubbo service and rocketmq consumer first when the program is stopped, and then stop the dubbo reference after both are executed? I know Spring has a SmartLifecycle tool, but it seems that Dubbo does not support it. My environment:
   Dubbo: 3.2.5
   Spring: 4.3


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] How to achieve graceful shutdown after integrating Rocketmq and Dubbo? [dubbo]

Posted by "lpcy (via GitHub)" <gi...@apache.org>.
lpcy commented on issue #13185:
URL: https://github.com/apache/dubbo/issues/13185#issuecomment-1761269300

   > 1. We should only offline provider.
   > 2. You can call `http://127.0.0.1:22222/offline` or `http://127.0.0.1:22222/gracefulShutdown` to offline all the service provided on Dubbo.
   
   Thank you. How can I close all providers in the code?


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] How to achieve graceful shutdown after integrating Rocketmq and Dubbo? [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #13185: How to achieve graceful shutdown after integrating Rocketmq and Dubbo?
URL: https://github.com/apache/dubbo/issues/13185


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] How to achieve graceful shutdown after integrating Rocketmq and Dubbo? [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13185:
URL: https://github.com/apache/dubbo/issues/13185#issuecomment-1761210781

   1. We should only offline provider.
   2. You can call `http://127.0.0.1:22222/offline` or `http://127.0.0.1:22222/gracefulShutdown` to offline all the service provided on Dubbo.
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] How to achieve graceful shutdown after integrating Rocketmq and Dubbo? [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13185:
URL: https://github.com/apache/dubbo/issues/13185#issuecomment-1763621855

   > > 1. We should only offline provider.
   > > 2. You can call `http://127.0.0.1:22222/offline` or `http://127.0.0.1:22222/gracefulShutdown` to offline all the service provided on Dubbo.
   > 
   > Thank you. How can I close all providers in the code?
   
   1. The most easily way is to request `http://127.0.0.1:22222/gracefulShutdown` via URLConnection or HttpUtils in your code.
   2. Using the following code (But this is not ensure in the future. The API may be changed in the future.)
   ```java
   @Autowired
   private ModuleModel moduleModel;
   
   ...
   
   new GracefulShutdown(ScopeModelUtil.getFrameworkModel(moduleModel)).execute(null, 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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] How to achieve graceful shutdown after integrating Rocketmq and Dubbo? [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13185:
URL: https://github.com/apache/dubbo/issues/13185#issuecomment-1987690911

   No news is good news. Please feel free to create a new issue if you have any question.
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org