Search code examples
spring-bootspring-websocketmessagebroker

Can we use spring-websockets with spring-boot message broker to create our own chat application that should target 1M users?


We want to create a chat application that targets 10M users. For this we want to use spring boot message broker and spring-web-sockets. We don't want to use any message brokers like ActiveMQ or any other broker. Is there any limitation with spring boot message broker? or is it necessary to use ActiveMQ or any other broker?


Solution

  • There is not such a feature like "Spring Boot Message Broker". You have been misled. Please, read Spring Framework docs about WebSockets support. There is nothing Spring Boot specific: https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#websocket

    My recommendation for such a 10M requirement is indeed go with an external broker, Like ActiveMQ or RabbitMQ. This way you can scale you application for sustainability and won't overhead a local memory to keep sessions for all those users.