Subjects and Multicasting Operators

Learn about subjects and multitasking operators.

Exploring subjects

Subjects are special types of observables. While plain observables are unicast, subjects are multicast. They allow multicasting values to all the subscribers. We can regard subjects as observers and observables at the same time.

  • We can subscribe to subjects to get emitted values by the producer (that’s why they act as observables).

  • We can send values and errors and complete the stream using the next, error, and complete methods (that’s why they act as observers).

Get hands-on with 1200+ tech skills courses.