@Override
    public void close() {
        try {
            if (Objects.nonNull(this.namingService)) {
                for (Map.Entry<String, EventListener> entry : listenerMap.entrySet()) {
                    String key = entry.getKey();
                    EventListener listener = entry.getValue();
                    this.namingService.unsubscribe(key, groupName, listener);
                }
                listenerMap.clear();
                this.namingService.shutDown();
                this.namingService = null;
                LOGGER.info("nacos registry shutting down...");
            }
        } catch (NacosException e) {
            LOGGER.error("nacos registry shutting down error ", e);
            throw new ShenyuException(e);
        }
    }
The type Nacos instance register repository.
shenyu-registry/shenyu-registry-nacos/src/main/java/org/apache/shenyu/registry/nacos/NacosInstanceRegisterRepository.java