liveBook · Manning

Subscription

A subscription is a registered or ongoing arrangement through which a consumer receives access to a service, content, data, or events over time.

How 2 Manning books explain it

Modern Angular

An RxJS subscription is an object representing an active connection to an observable and the execution associated with receiving its notifications.

How it is used
Controls observable execution and cleanup across Angular component, routing, service, and signal-interoperability lifecycles.
How deep it goes
Defines the returned object, demonstrates unsubscribe and takeUntil, and stops short of a complete shared-connection disposal strategy.
Examples
Uses interval logging, explicit unsubscribe, destroy$ cleanup, routed query parameters, and a notification web-socket service.
What you can do after
Operate subscription lifecycles by retaining handles, applying pipeline termination, and recognizing resource leaks in signal interop.

Read how Modern Angular explains subscription →

The Joy of JavaScript

A Subscription is an object that represents an ongoing connection to a stream or observable source for receiving values over time.

How it is used
Coordinates a subscriber’s connection to push-based streams and Observable sources.
How deep it goes
Defines subscription behavior and cleanup, with examples, but defers detailed operator and library implementations.
Examples
Uses Observable.of with console logging, explicit unsubscribe, and setInterval cleanup.
What you can do after
Operate an Observable connection by subscribing to events and invoking unsubscribe to stop delivery and perform cleanup.

Read how The Joy of JavaScript explains subscription →

Also covered in

Related concepts

Questions about subscription

What is subscription?

A subscription is a registered or ongoing arrangement through which a consumer receives access to a service, content, data, or events over time.

Which Manning books explain subscription?

Modern Angular and The Joy of JavaScript.

What is the difference between subscription and free tier?

A subscription is a registered or ongoing arrangement through which a consumer receives access to a service, content, data, or events over time. A free tier is a service offering or usage allowance available without charge, typically subject to limits on usage, features, eligibility, or duration.

What is subscription part of?

Subscription is part of reactive stream. Reactive Streams is a standard defining interfaces and signaling rules for asynchronous stream processing with nonblocking backpressure between producers and consumers.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.