Queue vs topic
Queue: point-to-point, each message consumed once. Topic: pub/sub, multiple subscribers each get a copy. Kafka topics are partitioned logs; RabbitMQ queues are the default.
kafka-topics.sh --create --topic orders --partitions 6
System Design & Architecture · 9 sections
Kafka, RabbitMQ, and the messaging patterns behind event-driven systems.
Queue: point-to-point, each message consumed once. Topic: pub/sub, multiple subscribers each get a copy. Kafka topics are partitioned logs; RabbitMQ queues are the default.
kafka-topics.sh --create --topic orders --partitions 6
Application that writes messages to a broker. Should handle retries, idempotency, and backpressure. Producers choose partition via key or round-robin.
producer.send(new ProducerRecord<>("orders", key, value))
Application that reads and processes messages. Tracks progress via offsets/acks. Should be idempotent and handle rebalancing gracefully.
consumer.subscribe(List.of("orders"));
ConsumerRecords<K,V> r = consumer.poll(Duration.ofMillis(100));
133 more cards in this sheet
Unlock the System Design bundle — ₹399
One-time payment. Unlocks this sheet and 10 other sheets in the bundle, plus a typeset PDF of each.
Unlock the bundle See all bundles
Or get all 76 sheets for ₹999 — one payment, every future sheet included.
What's new and the interview questions people are actually getting asked. No spam.