PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Software Engineering Fundamentals/Amazon

Design an In-Memory Pub-Sub Model

Last updated: May 14, 2026

Quick Overview

This question evaluates object-oriented design and API modeling skills, knowledge of messaging/pub-sub semantics, concurrency and thread-safety, and the ability to reason about extensibility for retries, persistence, and asynchronous delivery.

  • medium
  • Amazon
  • Software Engineering Fundamentals
  • Software Engineer

Design an In-Memory Pub-Sub Model

Company: Amazon

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

Design an object-oriented, in-memory publish-subscribe model. Requirements: - A publisher can publish a message to a topic. - A subscriber can subscribe to or unsubscribe from a topic. - When a message is published to a topic, all current subscribers of that topic should receive the message. - The design should support multiple topics and multiple subscribers. - Define the main classes, interfaces, and public APIs. - Explain the delivery behavior, thread-safety considerations, and how you would extend the design for retries, persistence, or asynchronous delivery.

Quick Answer: This question evaluates object-oriented design and API modeling skills, knowledge of messaging/pub-sub semantics, concurrency and thread-safety, and the ability to reason about extensibility for retries, persistence, and asynchronous delivery.

Related Interview Questions

  • Validate AI-Generated Code Safely - Amazon (medium)
  • Fix the Password Reset Workflow - Amazon (medium)
  • Explain inheritance, polymorphism, constructors, destructors - Amazon (easy)
  • Explain Aurora-style internals: WAL, MVCC, replication, recovery - Amazon (hard)
  • Build a responsive grid of fixed boxes - Amazon (medium)
Amazon logo
Amazon
Apr 10, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
0
0

Design an object-oriented, in-memory publish-subscribe model.

Requirements:

  • A publisher can publish a message to a topic.
  • A subscriber can subscribe to or unsubscribe from a topic.
  • When a message is published to a topic, all current subscribers of that topic should receive the message.
  • The design should support multiple topics and multiple subscribers.
  • Define the main classes, interfaces, and public APIs.
  • Explain the delivery behavior, thread-safety considerations, and how you would extend the design for retries, persistence, or asynchronous delivery.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.