@RequestMapping(value = "")
    public @ResponseBody TubeMQResult topicMethodProxy(@RequestParam String method, @RequestBody String req)
            throws Exception {
        // Log audit: Record the received method and req parameters
        LOGGER.info("Received method for topicMethodProxy: {}", method);
        LOGGER.info("Received req for topicMethodProxy: {}", req);

        // Validate the 'method' parameter
        if (!isValidMethod(method)) {
            return handleInvalidMethod(method);
        }

        // Validate the 'req' parameter
        if (!isValidJson(req)) {
            return handleInvalidJson(req);
        }

        // Perform processing based on the 'method' parameter
        switch (method) {
            case TubeConst.ADD:
                return handleAddTopicRequest(req);
            case TubeConst.CLONE:
                return handleCloneTopicRequest(req);
            case TubeConst.AUTH_CONTROL:
                return handleAuthControlRequest(req);
            case TubeConst.MODIFY:
                return handleModifyTopicRequest(req);
            case TubeConst.DELETE:
            case TubeConst.REMOVE:
                return handleDeleteTopicRequest(req);
            case TubeConst.QUERY_CAN_WRITE:
                return handleQueryCanWriteRequest(req);
            case TubeConst.PUBLISH:
                return handlePublishRequest(req);
            case TubeConst.SUBSCRIBE:
                return handleSubscribeRequest(req);
            default:
                return handleInvalidMethod(method);
        }
    }
Broker method proxy.
Divides the operation on the broker into different methods.
inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/controller/topic/TopicWebController.java