My application is spring boot micro service listening to a Rabbit MQ queue. The queue receives messages from different sources.
The requirement is that when the application server is going down (this could happen because of many reasons, may be because we brought the site down, or we are deploying an updated software on to our application server) we would like the queue to process the current message. As of now, we lose the message that the queue is currently processing. How can I achieve this?
答案 0 :(得分:0)
默认shutdownTimeout
是5000毫秒;你可以增加它。
但是,你不应该丢失任何消息,它应该被重新排队(除非你使用AcknowledgeMode.NONE
(这通常是一个坏主意)。