The first example, you see a BehaviorSubject being used. BehaviorSubjects are useful in that you will always get a result on subscription. In order to mimic this in a ReplaySubject, you'd need to explicitly call onNext at least once, and set the buffer size to one.