You create a topic named loT-Data with 10 partitions and replication factor of three.
A producer sends 1 MB messages compressed with Gzip.
Which two statements are true in this scenario?
(Select two.)
Compression type will be stored in batch attributes.
By default, compression is the producer’s responsibility.
The message is already compressed so it will not be serialized.
All compressed messages will be stored in the same topic partition.
A: Kafka batches store compression metadata in their headers, indicating how the batch was compressed.
B: Compression is controlled via the producer config compression.type, which defaults to none. Producers explicitly set Gzip or other formats.
From Kafka Producer Docs:
“Compression is done by the producer, and the type is stored in the message batch metadata. The broker does not recompress.”
C is false: messages are serialized before compression.
D is false: messages without keys are distributed across multiple partitions.
Submit