class MqttClientDebugSubscriptionProvider implements SubscriptionProvider {

    private final NetworkManager networkManager;

    public MqttClientDebugSubscriptionProvider(NetworkManager networkManager) {
        this.networkManager = networkManager;
    }

    @Override
    public String id() {
        return "network-client-mqtt-debug";
    }

    @Override
    public String name() {
        return "MQTT客户端调试";
    }

    @Override
    public String[] getTopicPattern() {
        return new String[]{
            "/network/mqtt/client/*/_subscribe/*",
            "/network/mqtt/client/*/_publish/*"
        };
    }

    @Override
    public Flux<Object> subscribe(SubscribeRequest request) {<FILL_FUNCTION_BODY>}

    public Flux<Object> mqttClientSubscribe(MqttClient client,
                                            PayloadType type,
                                            SubscribeRequest request) {
        String topics = request.getString("topics", "/#");

        return client
            .subscribe(Arrays.asList(topics.split("[\n]")))
            .map(mqttMessage -> Message.success(request.getId(), request.getTopic(), MqttMessageResponse.of(mqttMessage, type)));

    }

    public Flux<String> mqttClientPublish(MqttClient client,
                                          PayloadType type,
                                          SubscribeRequest request) {
        MqttMessageRequest messageRequest = FastBeanCopier.copy(request.values(), new MqttMessageRequest());

        return client
            .publish(MqttMessageRequest.of(messageRequest, type))
            .thenReturn("推送成功")
            .flux();

    }
}

        DebugAuthenticationHandler.handle(request);
        Map<String, String> vars = TopicUtils.getPathVariables("/network/mqtt/client/{id}/{pubsub}/{type}", request.getTopic());

        String clientId = vars.get("id");
        String pubsub = vars.get("pubsub");
        PayloadType type = PayloadType.valueOf(vars.get("type").toUpperCase());

        return networkManager
            .<MqttClient>getNetwork(DefaultNetworkType.MQTT_CLIENT, clientId)
            .flatMapMany(mqtt ->
                "_subscribe".equals(pubsub)
                    ? mqttClientSubscribe(mqtt, type, request)
                    : mqttClientPublish(mqtt, type, request))
            ;
    
<no_super_class>