Spring Boot + ReactJS + ActiveMQ Classic - STOMP failover support for existing websocket (chat) connections

45 views Asked by At

Chat has been implemented using ReactJS with Spring Boot as the back-end. We enabled relay to STOMP broker AWS Managed ActiveMQ service. The use-case is straight forward; the chat has to be connected 24x7. We configured the broker in a active/standby configuration. As soon as there is a fail-over of active broker(url-1) the standby broker(url-2) kicks-in. We have provided with a supplier of two addresses for active and standby, the system fail-over is happening as expected. However, the chats are not ported automatically to standby broker, rather, it's just disconnected in UI and a fresh WebSocket connection needed to be requested and user message are lost within that thin fail-over window.

Looking for some help with Spring Boot / Netty side code changes to reconnect to address #2 without executing afterConnectionClosed() method. Or any other architectural solutions to mitigate the problem.

0

There are 0 answers