public void stopFetchWorkers(boolean onlySetStatus) throws InterruptedException {
        if (onlySetStatus) {
            if (this.managerStatus.get() == 0) {
                return;
            }
            this.managerStatus.set(0);
            if (MessageFetchManager.this.pushConsumer.isConsumePaused()) {
                MessageFetchManager.this.pushConsumer.resumeConsume();
            }
            return;
        } else {
            this.managerStatus.set(0);
        }
        if (this.fetchWorkerPool == null) {
            return;
        }
        StringBuilder sBuilder = new StringBuilder(256);
        logger.info(sBuilder.append("[STOP_FetchWorker] All fetch workers:")
                .append(Arrays.toString(fetchWorkerPool)).toString());
        sBuilder.delete(0, sBuilder.length());
        if (MessageFetchManager.this.pushConsumer.isConsumePaused()) {
            MessageFetchManager.this.pushConsumer.resumeConsume();
        }
        logger.info("[STOP_FetchWorker] Wait all fetch workers exist:");
        if (waitAllFetchRequestHolds(this.consumerConfig.getPushListenerWaitPeriodMs())) {
            for (final Thread thread : this.fetchWorkerPool) {
                if (thread != null) {
                    thread.interrupt();
                }
            }
            for (final Thread thread : this.fetchWorkerPool) {
                if (thread != null) {
                    thread.join();
                    logger.info(sBuilder.append("[STOP_FetchWorker]").append(thread).toString());
                    sBuilder.delete(0, sBuilder.length());
                }
            }
        }
        this.pushConsumer
                .getBaseConsumer().notifyAllMessageListenerStopped();
        Thread.sleep(200);
        logger.info("[STOP_FetchWorker] All fetch workers are stopped.");
    }
Stop fetch worker threads

@param onlySetStatus  Whether to only set the state without stopping the operation
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/consumer/MessageFetchManager.java