update 修改websocket 心跳间隔,nexa地址检查bug
This commit is contained in:
@@ -67,7 +67,7 @@ public class WebSocketBrokerConfig implements WebSocketMessageBrokerConfigurer {
|
||||
public void configureMessageBroker(MessageBrokerRegistry config) {
|
||||
|
||||
config.enableSimpleBroker(Destination.TOPIC, Destination.QUEUE_USER,Destination.QUEUE_CUSTOMER,Destination.QUEUE_CLOSE_ROOM)
|
||||
.setHeartbeatValue(new long[] {10000, 10000})
|
||||
.setHeartbeatValue(new long[] {20000, 20000})
|
||||
.setTaskScheduler(new DefaultManagedTaskScheduler());
|
||||
|
||||
config.setApplicationDestinationPrefixes(Destination.SEND_PREFIX);
|
||||
|
||||
@@ -79,6 +79,8 @@ public class StompServiceImpl implements StompService {
|
||||
// handleImage(userMessageVo.getEmail()+principal.getName(),userMessageVo.getContent());
|
||||
//}
|
||||
|
||||
//TODO 多端情况下,需要把消息发送给自己
|
||||
|
||||
messagingTemplate.convertAndSendToUser(userMessageVo.getEmail(), Destination.QUEUE_USER + "/" + userMessageVo.getEmail(),build);
|
||||
executeTran(principal, userMessageVo, chatRoom);
|
||||
return AjaxResult.success("成功");
|
||||
@@ -104,6 +106,9 @@ public class StompServiceImpl implements StompService {
|
||||
//}else{
|
||||
// handleImage(userMessageVo.getEmail()+principal.getName(),userMessageVo.getContent());
|
||||
//}
|
||||
|
||||
//TODO 多端情况下,需要把消息发送给
|
||||
|
||||
messagingTemplate.convertAndSendToUser(userMessageVo.getEmail(), Destination.QUEUE_CUSTOMER + "/" + userMessageVo.getEmail(),build);
|
||||
executeTran(principal, userMessageVo, chatRoom);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user