You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
@WebSocketControllerAdvicepublic class WebSocketExceptionAdvice { @WebSocketExceptionHandler(throwables = { GroupProcessingException.class }) public ResponseEntity groupProcessingExceptionHandler(GroupProcessingException e) { return new ResponseEntity(ResponseEntity.ResponseStatus.ERROR, e.getMessage()); }}
WebSocket template
Provides helper methods for websocket control.
MessageFrame object
channelType: GROUP(Channel group), SINGLE(Channel)destination: group name or channel idmessage: websocket message stringdata: websocket data body object
Single channel helper
send
join
leave
Channel group helper
sendGroup
joinGroup
leaveGroup
PubSub for multiple websocket server instances
You can implement and provide a Publisher or Subscriber interface.this example uses the redis pub/sub provider by default.