update 修改websocket 心跳间隔,nexa地址检查bug

This commit is contained in:
yyb
2025-06-05 16:46:29 +08:00
parent ca86a560dc
commit 3e2178e161
5 changed files with 11 additions and 7 deletions

View File

@@ -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);

View File

@@ -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);