AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
To stop the DubboConsumer, one should call ShutdownHook to change the variable to let the thread break the loop.During the startup of DubboConsumer, an independent non-daemon thread is launched to query the status of the variable continuously, thus the process can’t exit.Its function is not only to close the Tomcat, but also to perform other cleanup work. Therefore, the normal application will execute the above ShutdownHook during the stop process (except kill -9 $PID). Respond to external signals, such as Ctrl+C(actually sent as SIGINT signal), or SIGTERM signal ( kill $PID will send SIGTERM signal by default).The virtual machine is terminated in response to a user interrupt, such as typing ^C, or a system-wide event, such as user logoff or system shutdown.The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit) method is invoked, or.The Java virtual machine shuts down in response to two kinds of events: Dubbo start/stop in spring (scanBasePackages = "." ) public class DubboConsumerDemo īy reffering the Java API documentation, we found that ShutdownHook will be executed under the following two cases.Makes it More Convenient for You to Proxy Dubbo Services in Apache APISIX. How to proxy Dubbo service in Apache ShenYu Gateway.
0 Comments
Read More
Leave a Reply. |