-

@ Frederik Handberg
2025-05-29 22:26:39
Trying to implement WebSocket in Spring Boot.
Only time I’ve used WebSocket before, was in a SignalR server.
Going to use it for a chat app I am working on. It’s just a portfolio project that I’m doing to learn.
The Spring Boot project includes REST endpoints to fetch the chat history between two users, but of course, I want real-time communication as well.
Users should be able to receive messages immediately without having to refresh the page.
For this, I will be using WebSocket.
I finally got the connection working. Now users can send messages to each other and receive in real-time, but I’m having some trouble with including all the necessary information in the STOMP, such as who sent the message. So right now, it just shows ‘unknown’ as the sender… #dev #WebSocket