Event-Driven Architecture and Asynchronous Messaging Questions

Designing systems around events and message passing: publish/subscribe, message queues, event streaming, choreography versus orchestration, and decoupling producers from consumers. Covers delivery semantics (at-least-once, at-most-once), ordering, backpressure, dead-letter handling, and the operational tradeoffs of asynchronous flows. Includes async processing patterns for offloading slow work.

MediumTechnical
80 practiced

A client asks you to recommend between Kafka, Amazon SQS, and RabbitMQ given requirements: durable event storage, long retention, consumer replay, low-latency processing, and moderate ops complexity. Compare the three in terms of ordering guarantees, retention/replay, scaling model, operational cost, and typical use-cases (audit log, task queue, pub/sub notification).

MediumTechnical
75 practiced

Implement (in Python) an HTTP consumer handler that receives JSON POST events with a unique 'event_id'. Use Redis to ensure idempotent processing by atomically marking an event as processed and only invoking the handler once per event_id. Show the atomic check-and-set logic and TTL handling to prevent unbounded state.

MediumTechnical
92 practiced

Implement an exponential backoff retry strategy as a middleware for a Node.js message consumer. The middleware should support max retries, jitter, and configurable base/backoff multipliers. Provide code or clear pseudocode showing retry logic, how failures are bubbled to DLQ after max retries, and where to insert idempotency checks.

MediumTechnical
78 practiced

You are on call for an asynchronous data-ingestion pipeline with an SLA to persist every event within 60 seconds. Design the observability and alerting strategy: what would you track, what would actually be worth paging someone for, and what would your on-call runbook tell them to check first?

MediumTechnical
97 practiced

Explain the difference between message queues and event streams using: (1) simple high-level definitions, (2) step-by-step architecture differences (point-to-point vs publish-subscribe, retention and consumer offsets), (3) concrete use cases (task queue for background jobs vs event log for analytics), (4) discuss delivery semantics (at-least-once, at-most-once, exactly-once) and operational trade-offs.

Unlock Full Question Bank

Get access to all 47 Event-Driven Architecture and Asynchronous Messaging interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.