Skip to content

openSubscriptionSession

openSubscriptionSession(options, requests): Promise<SubscriptionSession>

Defined in: packages/client/src/circuits/subscription-client.ts:148

The client’s half of the native subscribe path (ADR-0055 decisions 6 and 10).

The native path inverts how a client finds a stream. On the Electric path it constructed a URL (electricUrl?table=<shapeKey>) and the proxy resolved it; here it asks, and the control plane answers with the streams the subject may actually read. That inversion is what removes shape selection from the wire entirely — there is no client-supplied where or table left to discard.

SubscriptionClientOptions

readonly ShapeSubscriptionRequest[]

Promise<SubscriptionSession>