compression.type: The compression type for the data to be performed by the broker. Valid values are none, gzip, snappy, lz4, zstd, producer. The value ‘producer’ means to retain the original compression codec set by the producer. Our recommendation is to set this value to ‘producer’ so the producer can take the responsibility of compressing the data and allow broker CPUs to be used for other critical functions.
Partitions: The topic partition is the unit of parallelism in Kafka. Both partition writes (through producer/broker) and reads (through consumer) can be done fully in parallel. In general, the more the partitions, the higher the throughput you can achieve. There are some disadvantages with too many partitions, like more partitions may increase unavailability and also require more open file handles. There is no magic number to the ideal partition settings and hence determine the same based on your throughput requirements.
You can find more ideal settings for the producers, consumers and brokers in the Apache Kafka documentation.