Observer is not a message queue
transcript
People say observer and pub sub like they are one word. In interviews, too. They aren't the same tool. Here's the line.
Observer is a function call inside one program. The subject holds its listeners. A broker stores messages between machines. Both sides only know a topic. It retries. So handlers must be safe to run twice.
If an observer is down, the call just throws. The caller sees it. If a consumer is down, the message waits for it. It is delivered when the consumer is back. Observer has no such memory.
Inside one service, the order tells its listeners. A cache, a counter. One listener writes the event to an outbox. A broker carries it to the email service. Even if it was down.
Another machine means a broker. Stored messages, retries, safe handlers. Observer stays inside the service. That is the line.
Full breakdown in the lecture.