This video explains the Publish-Subscribe design pattern through a real-world healthcare use case: patient event distribution via Apache Kafka.
When a patient is admitted, the Patient Admission Service (Producer) publishes a patient event to the Kafka topic patient-events. Multiple independent services then consume the event in real time:
EHR Service – Updates the Electronic Health Record
Lab Service – Triggers lab order tests
Pharmacy Service – Prepares medications and queues prescriptions
Billing Service – Generates the billing record
The architecture is fully decoupled, HIPAA-secure, encrypted in transit (TLS), partitioned, and durable. Key benefits include independent service evolution, real-time processing, and easy scalability by simply adding new subscribers.