Design Patterns · Junior · Question 7 of 75

How does Pub/Sub differ from the classic Observer?

Explanation

In Observer, subscribers register directly with the subject. In Pub/Sub there's an intermediary (an event bus, a message broker), and participants know only channel names. This decouples parts of the system more strongly but makes the event flow harder to trace.

Further reading

Problem with a question

Design Patterns · Junior · question 7

Test yourself

Take the Design Patterns · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz