static void modifyInterBrokerThrottle(Admin adminClient,
                                          Set<Integer> reassigningBrokers,
                                          long interBrokerThrottle) throws ExecutionException, InterruptedException {
        if (interBrokerThrottle >= 0) {
            Map<ConfigResource, Collection<AlterConfigOp>> configs = new HashMap<>();
            reassigningBrokers.forEach(brokerId -> {
                List<AlterConfigOp> ops = new ArrayList<>();
                ops.add(new AlterConfigOp(new ConfigEntry(QuotaConfigs.LEADER_REPLICATION_THROTTLED_RATE_CONFIG,
                    Long.toString(interBrokerThrottle)), AlterConfigOp.OpType.SET));
                ops.add(new AlterConfigOp(new ConfigEntry(QuotaConfigs.FOLLOWER_REPLICATION_THROTTLED_RATE_CONFIG,
                    Long.toString(interBrokerThrottle)), AlterConfigOp.OpType.SET));
                configs.put(new ConfigResource(ConfigResource.Type.BROKER, Long.toString(brokerId)), ops);
            });
            adminClient.incrementalAlterConfigs(configs).all().get();
            System.out.println("The inter-broker throttle limit was set to " + interBrokerThrottle + " B/s");
        }
    }
Modify the leader/follower replication throttles for a set of brokers.

@param adminClient The Admin instance to use
@param reassigningBrokers The set of brokers involved in the reassignment
@param interBrokerThrottle The new throttle (ignored if less than 0)
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java