Producer/Consumer in RxJS

this.newAlarm = new Observable<SocketAlarmDto>(observer => {

  socket.on('alarm', (data: SocketAlarmDto) => {
    observer.next(data);
  });

});
this.newAlarmSubscription = this.socket.newAlarm.subscribe((data: SocketAlarmDto) => {
  async.series([
    (callback => this.syncAlarms(callback)),
    (callback => this.showAlarms(callback))
  ]);

});
this.newAlarmSubscription.unsubscribe();