feat: introduce middleware rabbitmq and redis

This commit is contained in:
merlin
2025-12-11 10:37:03 +08:00
parent a1a23bec7a
commit 44133d3667
22 changed files with 404 additions and 42 deletions

View File

@@ -2,6 +2,7 @@ package xin.merlin.myplayerbackend.utils.websocket;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
@@ -37,5 +38,12 @@ public class WebSocketSessionManager {
}
}
public void closeAll() {
websocketSessions.forEach((uid, session) -> {
try {
session.close(CloseStatus.GOING_AWAY);
} catch (Exception ignored) {}
});
}
}