LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
  • Stream
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
  • Stream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemoteStream
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServerStream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraph-sdkstreamChannelRegistry
Class●Since v1.9

ChannelRegistry

Copy
class ChannelRegistry

Constructors

Properties

Methods

View source on GitHub
constructor
constructor
property
size
property
thread
method
acquire
method
bind
method
dispose

Ref-counted, thread-aware projection registry.

Owns the spec.key → (store, runtime) mapping for one StreamController. Lifecycle:

  • acquire(spec) → +1 ref, returns { store, release }. The first acquire opens the projection's runtime; subsequent acquires for the same key share both the store and the runtime.
  • release() → -1 ref. When the last consumer releases, the entry is removed and its runtime disposed.
  • bind(thread) → swap or detach the underlying thread; every live entry's runtime is recreated against the new thread, keeping the same store identity.
  • dispose() → tear everything down (idempotent). Safe to call multiple times.

The registry is intentionally not generic over a state shape — different consumers can hold projections producing different snapshot types, so the registry keys everything as unknown and lets acquire reapply the caller's T at the boundary.