Producers huchapisha (huandika) events kwa topics za Kafka, na consumers husajili (husoma) events kutoka kwazo. Kuelewa jinsi wanavyofanya kazi — ikijumuisha partitioning, offsets, na consumer groups — ni msingi wa kutumia Kafka.
Producers — kuandika events
PRODUCERS publish events to TOPICS:
→ send a record (key, value) to a topic
→ the key determines the PARTITION (same key → same partition → ordering for that key);
no key → distributed (round-robin)
→ can configure ACKNOWLEDGMENTS (acks) for durability (wait for replicas to confirm)
→ batching, compression for throughput
