Search code examples
javaspringwebsocketspring-websocket

Spring websocket Get connection number and details


I need in my web application to know, when i receive a Stomp message, who is connected to the server via websocket and read the connection details. what is the class then have this informations and how i can read them?

My implementation in this one: https://spring.io/guides/gs/messaging-stomp-websocket/

and work correctly

thanks for help


Solution

  • I was using the wrong approach... Now when the client connect does a registration message sending the connection details params and the server save that on DB, the client send disconnection message after close the socket and the server make an update... In this way i have always the number of connections and details stored on DB.