Interview Q&A · questions with model answers
Messaging & Queues Interview Questions
Part of the study plan for: Backend Engineer · Data Engineer · Site Reliability Engineer (SRE)
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked What is the dual-write problem and how do you avoid it?
Writing to a database and publishing to a broker as two separate operations can leave them inconsistent if one fails (order saved but event never sent, or event sent but transaction rolled back).…
-
What is backpressure and how do message systems handle it?
Backpressure is the mechanism that slows producers or buffers work when consumers can't keep up, preventing overload. Queues naturally buffer, but unbounded growth eventually causes latency, memory…
-
What are event sourcing and CQRS?
Event sourcing stores state as an append-only sequence of events (OrderPlaced, ItemAdded, OrderPaid) and rebuilds current state by replaying them; CQRS separates the write model (commands) from read…
-
What is change data capture (CDC) and how is it used?
CDC reads a database's transaction log (Postgres WAL, MySQL binlog) and streams row changes as events, often via Debezium into Kafka, enabling cache invalidation, search indexing, analytics…
-
What is the inbox pattern?
The inbox pattern stores received message IDs (and sometimes payloads) in the consumer's database before or while processing, so duplicates are detected and processing can be retried reliably from…
-
What is stream processing and when do you need it?
Stream processing continuously computes over event streams (aggregations, windows, joins, anomaly detection) as data arrives, using frameworks like Kafka Streams, Apache Flink or Spark Structured…