public static void send(final String namespaceId, final String message, final DataEventTypeEnum type) {
        if (StringUtils.isBlank(message)) {
            return;
        }
        if (StringUtils.isBlank(namespaceId)) {
            throw new ShenyuException("namespaceId can not be null");
        }
        LOG.info("websocket send message to namespaceId: {}, message: {}", namespaceId, message);
        if (DataEventTypeEnum.MYSELF == type) {
            Session session = (Session) ThreadLocalUtils.get(SESSION_KEY);
            if (Objects.nonNull(session)) {
                if (session.isOpen()) {
                    sendMessageBySession(session, message);
                } else {
                    NAMESPACE_SESSION_MAP.getOrDefault(namespaceId, Sets.newConcurrentHashSet()).remove(session);
                }
            }
        } else {
            NAMESPACE_SESSION_MAP.getOrDefault(namespaceId, Sets.newConcurrentHashSet())
                    .forEach(session -> sendMessageBySession(session, message));
        }
        
    }
Send.

@param namespaceId the namespaceId
@param message the message
@param type the type
shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/websocket/WebsocketCollector.java