Hot vs. Cold

Learn about hot and cold observables.

We'll cover the following

Hot and cold

When you begin using reactive streams, you need to master the concept of hot versus. cold Observables. It’s not always obvious which type you are dealing with and the interactions between them cause problems.

A hot stream is one that cannot be repeated. It starts creating data immediately. Typically, it involves interacting with data from the outside world, such as mouse inputs, data readings, or web requests.

A cold stream is one that can be repeated and does not start until subscribed to. This could be things like a range, file data, or a cached recording of data from a hot Observable.

Hot streams typically are candidates for using backpressure flow control strategies, such as throttling, buffers, or windows.

Get hands-on with 1200+ tech skills courses.