I have Kafka engine table, MV and destination MT table.
Kafka table create query:
```
CREATE TABLE abc.Kafka_TestSource (...) 
ENGINE = Kafka 
SETTINGS kafka_broker_list = '...'
, format_avro_schema_registry_url = '...'
, kafka_topic_list = '...'
, kafka_group_name = 'Test_KafkaToCH'
, kafka_format = 'AvroConfluent'
, kafka_num_consumers = 1
, kafka_thread_per_consumer = 0
```

Due to Grafana consumer group stats dashboard it reads the topic with average speed ~11k records per second.
I recreate Kafka table with `kafka_num_consumers = 9` (kafka topic has 9 partitions) and it still reads with the same speed ~11k rps, **system.metrics** also shows that only 1 pool is being used:
```
SELECT
    m.metric,
    m.value
FROM system.metrics AS m
WHERE m.metric LIKE 'Background%'

Query id: 831a9285-e91b-45a4-8a1b-6b536d6860fe

┌─metric──────────────────────────────────┬─value─┐
│ BackgroundMergesAndMutationsPoolTask    │     4 │
│ BackgroundFetchesPoolTask               │     0 │
│ BackgroundCommonPoolTask                │     0 │
│ BackgroundMovePoolTask                  │     0 │
│ BackgroundSchedulePoolTask              │     0 │
│ BackgroundBufferFlushSchedulePoolTask   │     0 │
│ BackgroundDistributedSchedulePoolTask   │     0 │
│ BackgroundMessageBrokerSchedulePoolTask │     1 │
└─────────────────────────────────────────┴───────┘
```

If I set `kafka_thread_per_consumer = 1` then **BackgroundMessageBrokerSchedulePoolTask** in **system.metrics** raises up to 9 and read speed in Grafana raises up to 100 records per second:
![pic](https://github.com/sokolov-alexey/pics/blob/main/ch_kafka.PNG?raw=true)
1. `kafka_num_consumers = 1, kafka_thread_per_consumer = 0`
2. `kafka_num_consumers = 9, kafka_thread_per_consumer = 0`
3. `kafka_num_consumers = 9, kafka_thread_per_consumer = 1`

Why `kafka_num_consumers` doesn't work without `kafka_thread_per_consumer`?

ClickHouse 21.11.4.14.
kafka_settings->kafka_client_id.value.empty() ? getDefaultClientId(table_id_)
                                                        : getContext()->getMacros()->expand(kafka_settings->kafka_client_id.value))
    , format_name(getContext()->getMacros()->expand(kafka_settings->kafka_format.value))
    , row_delimiter(kafka_settings->kafka_row_delimiter.value)
    , schema_name(getContext()->getMacros()->expand(kafka_settings->kafka_schema.value))
    , num_consumers(kafka_settings->kafka_num_consumers.value)
    , log(&Poco::Logger::get("StorageKafka (" + table_id_.table_name + ")"))
    , semaphore(0, num_consumers)
    , intermediate_commit(kafka_settings->kafka_commit_every_batch.value)
    , settings_adjustments(createSettingsAdjustments())
    , thread_per_consumer(kafka_settings->kafka_thread_per_consumer.value)
    , collection_name(collection_name_)
{
    if (kafka_settings->kafka_handle_error_mode == HandleKafkaErrorMode::STREAM)
    {
        kafka_settings->input_format_allow_errors_num = 0;
        kafka_settings->input_format_allow_errors_ratio = 0;
    }
    StorageInMemoryMetadata storage_metadata;
    storage_metadata.setColumns(columns_);
    setInMemoryMetadata(storage_metadata);
    auto task_count = thread_per_consumer ? num_consumers : 1;
    for (size_t i = 0; i < task_count; ++i)
    {
        auto task = getContext()->getMessageBrokerSchedulePool().createTask(log->name(), [this, i]{ threadFunc(i); });
        task->deactivate();
        tasks.emplace_back(std::make_shared<TaskContext>(std::move(task)));
    }
}
SettingsChanges StorageKafka::createSettingsAdjustments()