public static void registerThreadPool(String groupId, ThreadPoolExecutor executor) {
        if (executor == null) {
            throw new IllegalArgumentException("executor must not be null");
        }

        if (GROUP_THREAD_POOLS.putIfAbsent(groupId, executor) != null) {
            throw new IllegalArgumentException(String.format("The group: %s has already registered the ThreadPool",
                groupId));
        }
    }
You can specify the ThreadPoolExecutor yourself here

@param groupId  Raft-Group
@param executor To specify ThreadPoolExecutor
jraft-core/src/main/java/com/alipay/sofa/jraft/util/ThreadPoolsFactory.java