Producere publicerer (skriver) events til Kafka-topics, og consumere abonnerer på (læser) events fra dem. Det er afgørende at forstå, hvordan de fungerer — herunder partitionering, offsets og consumer groups — for at kunne bruge Kafka.
Producere — skrivning af 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
