问题描述
我不确定我的理解是否正确.我们启动了一个 spring 云流应用程序并订阅了一个主题.该应用程序将运行并监视新消息的主题,除非我们发送终止信号以退出.我在想我们是否可以明确退出spring cloud应用程序,比如等待5分钟没有新消息进来?还是处理了 1000 条记录就退出了?
I am not sure if my understand is correct. We launch a spring cloud stream appliction and subscribe to a topic. The application will be running and mornitoring the topic for new message, except we send kill signal to quit. I was thinking if we could quit spring cloud application explicityly, like waiting 5 minutes and no new messages come in? Or processed 1000 records and quit?
推荐答案
您不需要为此停止应用程序,因为它会带来整个 JVM(如果您愿意,您可以随时执行此操作).通常对于这样的用例,您stop/pause/start/resume
单独绑定基本上允许其他绑定起作用.此处 是您可以找到更多信息的地方
You don't need to stop the application for this as it will bring the entire JVM (which you can always do if you want).Typically for use cases like this you stop/pause/start/resume
bindings individually essentially allowing other bindings to function.Here is where you can find more information
这篇关于spring cloud stream - spring cloud 流应用程序可以明确退出吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!