Process Flow - Batch size and compression tuning
Start Producer
Collect Messages
Check Batch Size
Compress Batch
Send Batch
Repeat
Kafka producer collects messages into batches, compresses them if batch size is reached, then sends them to the broker.