Spring Stomp CAN send unsolicited messages
问题 In the Spring WebSocket docs I found this sentence: It is important to know that a server cannot send unsolicited messages. http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html (25.4.1) However I tried this code: @Controller public class WebsocketTest { @Autowired public SimpMessageSendingOperations messagingTemplate; @PostConstruct public void init(){ ScheduledExecutorService statusTimerExecutor=Executors.newSingleThreadScheduledExecutor();