Using WebSocket to build an interactive web application.

What is Websocket?
WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection.
This is the main reasion which websocket is preferred over the HTTP protocol when building a chat-like communication service that operates at high frequencies with low latency.
Configuring WebSocket
@EnableWebSocketMessageBrokerannotation is used to enable our WebSocket server.WebSocketMessageBrokerConfigurerinterface is used to provide implementation for some of its methods to configure the websocket connection.registerStompEndpointsmethod is used to register a websocket endpoint that the clients will use to connect to the server.configureMessageBrokermethod is used to configure our message broker which will be used to route messages from one client to another.