Subscription
A subscription is an object or association representing an ongoing relationship through which a consumer receives updates or data from a source and may control that relationship.
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.
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.
Related concepts
- subscribeproduced by · Subscribe is the operation of registering a consumer with an observable, publisher, or event source to receive values, errors, completion signals, or other notifications.
- unsubscribeuses · Unsubscribe is the operation of detaching a consumer, listener, or recipient from a subscription or event source so it no longer receives notifications.
- reactive streampart of · Reactive Streams is a standard defining interfaces and signaling rules for asynchronous stream processing with nonblocking backpressure between producers and consumers.
- callbackuses · A callback is a function or other callable supplied to software for invocation later in response to a specified event, condition, or point in execution.
- observableuses · An observable is a source that emits a sequence of values or notifications over time to consumers that subscribe to it.
- signalcontrasts with · A signal is an observable value, event, or pattern that conveys information about a condition, state, or phenomenon.
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.

