Producers Kafka topics కు events ను publish చేస్తాయి (write చేస్తాయి), మరియు consumers వాటి నుండి events ను subscribe చేస్తాయి (read చేస్తాయి). వాటి పని చేయడం ఎలా ఉందో అర్థం చేసుకోవడం — partitioning, offsets, మరియు consumer groups సహా — Kafka ను ఉపయోగించడానికి ఆధారమైనది.
Producers — events లను write చేయడం
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
