public Mono<TurmsNotification> handleServiceRequest(
            UserSessionWrapper sessionWrapper,
            SimpleTurmsRequest request,
            ByteBuf serviceRequestBuffer,
            TracingContext tracingContext) {
        try {
            // Validate
            long requestId = request.requestId();
            if (requestId <= 0) {
                return Mono.just(NotificationFactory.create(ResponseStatusCode.INVALID_REQUEST,
                        "The request ID must be greater than 0",
                        requestId));
            }
            // Check server status
            ServiceAvailability serviceAvailability = serverStatusManager.getServiceAvailability();
            if (!serviceAvailability.isAvailable()) {
                return Mono.just(NotificationFactory.create(ResponseStatusCode.SERVER_UNAVAILABLE,
                        serviceAvailability.reason(),
                        requestId));
            }

            // Rate limiting
            if (!ipRequestThrottler.tryAcquireToken(sessionWrapper.getIp(), System.nanoTime())) {
                blocklistService.tryBlockIpForFrequentRequest(sessionWrapper.getIp());
                UserSession userSession = sessionWrapper.getUserSession();
                if (userSession != null) {
                    blocklistService.tryBlockUserIdForFrequentRequest(userSession.getUserId());
                }
                return Mono.just(NotificationFactory
                        .create(ResponseStatusCode.CLIENT_REQUESTS_TOO_FREQUENT, requestId));
            }

            // Handle the request to get a response
            TurmsRequest.KindCase requestType = request.type();
            tracingContext.updateThreadContext();
            return switch (requestType) {
                case CREATE_SESSION_REQUEST -> sessionController
                        .handleCreateSessionRequest(sessionWrapper, request.createSessionRequest())
                        .map(result -> getNotificationFromHandlerResult(result,
                                request.requestId()));
                case DELETE_SESSION_REQUEST ->
                    sessionController.handleDeleteSessionRequest(sessionWrapper);
                default -> {
                    serviceRequestBuffer.retain();
                    yield handleServiceRequest(sessionWrapper, request, serviceRequestBuffer);
                }
            };
            // Don't need to catch here to use the outer consistent catch
        } finally {
            serviceRequestBuffer.release();
            tracingContext.clearThreadContext();
        }
    }
The method ensures serviceRequestBuffer will be released by 1
turms-gateway/src/main/java/im/turms/gateway/access/client/common/ClientRequestDispatcher.java