Interview prompt
Problem context
Skills being evaluated
Use the sequence below to surface constraints, choose boundaries, test failure behavior, and defend trade-offs. Concrete numbers are interview assumptions, not claims about a real production system.
Clarify the decision
- Document actual delivery, acknowledgment, ordering, retention, replay, and failure semantics by topic. Identify consumers whose business correctness depends on legacy quirks.
Establish scale assumptions
- Measure volume, partition skew, retention, lag, poison rates, and migration bandwidth. Size the bridge for peak plus replay without starving live traffic.
Functional and non-functional requirements
- No business event is lost, duplicates remain safe, ordering guarantees are explicit, producers and consumers move independently, and rollback is possible during a bounded window.
High-level architecture
- Introduce a versioned event envelope and migration bridge that writes one authoritative log then forwards idempotently. Run dual consumers or shadow compares, with per-topic state and checkpointed offsets.
Data model and flow
- Preserve event ID, key, source offset, schema, and causation; map partitions deliberately rather than assuming equivalence. Consumers store business outcome and consumed identity atomically.
Consistency and transaction boundaries
- At-least-once bridging is expected; exactly-once labels do not span two brokers and databases. Ordering is defined per business key and validated after repartitioning.
Failure modes and recovery
- Bridge lag alarms before retention loss, poison messages quarantine with ownership, and duplicate delivery is tested. A topic cutover freezes producer routing briefly or records a terminal old-log position.
Security and privacy
- Recreate topic authorization, encryption, residency, and audit before payload movement. Do not grant the bridge global read and write longer than migration requires.
Observability and SLOs
- Track old and new offsets, event-set hashes, lag, duplicate effects, ordering violations, consumer version, and remaining dependencies. Completion requires zero legacy traffic and exercised replay.
Capacity and cost
- Dual infrastructure and egress are temporary migration costs. Prioritize topics by risk and business value and time-box retention overlap.
Alternatives and trade-offs
- Producer dual-publish is simple locally but creates partial success; log-to-log bridging centralizes that complexity. A bridge is safer if it has durable checkpoints, idempotency, and finite life.
Evolution and migration
- Standardize envelopes, migrate low-risk consumers, shadow high-risk consumers, move producers topic by topic, drain retained history, revoke legacy access, and decommission after rollback expiry.
What Staff and Principal candidates should emphasize
- Staff candidates migrate semantics, not brand names. They define log positions, event identity, consumer effects, partition mapping, and the exact bridge-removal proof.
Decision trade-offs
Replication path
Option A
Every producer dual-publishes
Option B
One authoritative bus with a checkpointed bridge
Recommendation:Use a bridge to concentrate partial-failure handling and keep producers simple, while accepting and governing the bridge as temporary critical infrastructure.
Consumer cutover
Option A
Switch consumers directly
Option B
Shadow or dual-consume with effect suppression
Recommendation:Shadow results first; dual-consume only when effects are suppressed or idempotently proven.
Follow-up interview questions
- 01How do you choose the authoritative bus during coexistence?
- 02What happens if bridge lag exceeds legacy retention?
- 03How are partition-order changes validated?
- 04When can the old bus be turned off?
Common weak answers and mistakes
- 01Assuming broker exactly-once semantics protect database side effects.
- 02Dual-publishing from every producer without a partial-success protocol.
- 03Mapping partitions mechanically and breaking business-key order.
- 04Leaving the migration bridge permanently because dependency tracking is incomplete.
Interviewer evaluation rubric
Moves clients to a new broker but cannot preserve semantics, history, order, or side-effect safety.
Uses stable IDs, envelopes, a checkpointed bridge, shadow consumers, lag monitoring, and topic cutovers.
Adds event-set validation, effect deduplication, poison ownership, security parity, rollback positions, and exit proof.
Turns undocumented messaging behavior into explicit domain contracts and retires both technical and organizational dependence safely.