spring-guides/gs-messaging-stomp-websocket

convertAndSendToUser not work

An0nymous0 opened this issue · 0 comments

messagingTemplate.convertAndSendToUser(headerAccessor.getSessionId(),"/user/queue/greetings", new Greeting("Hello, " + HtmlUtils.htmlEscape(headerAccessor.getSessionId()) + "!"));

stompClient.subscribe('/user/queue/greetings', function (greeting) { showGreeting(JSON.parse(greeting.body).content); });