This is an example project of how to use Spring WebSocket integrated with Message Broker Active MQ to deal with the scenario where you scale out your Microservice and keep the WebSocket communication working between different Clients connected to your backend service.
Github: https://github.com/educostadev/spring-websocket-message-broker