I producer pubblicano (scrivono) eventi negli argomenti (topic) di Kafka, e i consumer si iscrivono (leggono) agli eventi da essi. Comprendere come funzionano — inclusi il partizionamento, gli offset e i consumer group — è fondamentale per utilizzare Kafka.
Producer — scrivere eventi
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
