This video explains the Publish-Subscribe design pattern through an airline use case focused on flight booking event distribution using Apache Kafka.
The Booking Service (Producer) generates flight bookings for passengers and publishes a Flight Booked event to the Kafka topic flight-booked.
Apache Kafka acts as the central message broker, storing and distributing events reliably to all subscribers.
Independent services then consume the event in real time:
Ticketing Service – Issues and manages passenger tickets
Check-in Service – Processes passenger check-in and boarding
Baggage Service – Handles baggage tracking, loading, and updates
Key Benefits:
Decoupling – Services remain independent with no direct coupling
Scalability – Easily add new subscribers without code changes
Real-Time – Instant event propagation to all services
Reliability – Fault-tolerant and durable message delivery
Flow: Passenger books a flight → Booking Service publishes the “Flight Booked” event → Ticketing, Baggage, Check-in (and other) services each process the event independently in real time.