const Subject = rxjs.Subject; sub = new Subject(); sub.subscribe({ next: res => console.log('A', res) }) sub.subscribe({ next: res => console.log('B', res) }) sub.next(1); sub.next(2);