More powerful the Subject be caution!

In fact, publish() is just a façade that uses Rx.Subject to carry out its work


        interface Subject extends Observable implements Subscription {
        }
    

        const subject = new Rx.Subject()

        subject.subscribe(x => console.log(`Source 1: ${x}`))
        subject.subscribe(x => console.log(`Source 2: ${x}`))

        subject.next(0)

        Rx.Observable.from([1, 2, 3, 4, 5])
            .map(x => x * x)
            .subscribe(subject)
    
Always try to avoid and use usual Observable - Observer couple as far as possible

Multicast Operator Mapping