How to handle message loss in queue channel?

635 Views Asked by At

I'm using a queue channel with queue capacity of 1000, what I'd like to know. When my application is being restarted, what will happen to those messages which are being stored in my queue. Will there be a message loss? Is it possible to handle this scenario without message loss.

1

There are 1 best solutions below

14
Artem Bilan On

To not lose messages in between, you need to configure a persistent message store for your queue channels.

See more info in docs: https://docs.spring.io/spring-integration/docs/current/reference/html/system-management.html#message-store

Also read this article where we give a big accent to the persistent store to keep in mind: https://spring.io/blog/2020/10/26/case-study-aggregator-function-and-processor