Kafka Tuning

The main lever you can adjust to tune Kafka throughput is the number of partitions.

To determine the number of partitions required to attain your desired throughput, calculate
the throughput for a single producer (p) and a single consumer (c), and then use that with
the desired throughput (t) to roughly estimate the number of partitions to use. You would
want at least max(t/p, t/c) partitions to attain the desired throughput.

For more information, see
How to Choose the Number of Topics or Partitions in a Kafka Cluster.