Spring WebSocket stopped working, how to find the reason?

1.4k Views Asked by At

I cannot understand why sometimes my spring boot (version 1.4.1) application based on spring-boot-starter-tomcat and spring-boot-starter-websocket stops working.

Specifically my application provides is meant to provide to the client some real-time events about system status. These events can be both periodical or in response to user input and events are sent by means of the SimpMessagingTemplate's convertAndSend method.

Sometimes all events stops working but I cannot find any evidence in logs: nor exceptions neither BrokerAvailabilityEvents saying that the Broker failed.

I have no idea of how to fix it.

1

There are 1 best solutions below

3
On BEST ANSWER

It turned out that SimpMessagingTemplate's convertAndSend method was not called because the thread that was responsible for calling it on behalf of an event was stuck and froze all event notification chain.