Home / Skills / System Administration / subscriptions

subscriptions

By trpc. Updated March 28, 2026. Categories: System Administration.

Set up real-time event streams with async generator subscriptions using .subscription(async function*() { yield }). SSE via httpSubscriptionLink is recommended over WebSocket. Use tracked(id, data) from @trpc/server for reconnection recovery with lastEventId. WebSocket via wsLink and createWSClient from @trpc/client, applyWSSHandler from @trpc/server/adapters/ws. Configure SSE ping with initTRPC.create({ sse: { ping: { enabled, intervalMs } } }). AbortSignal via opts.signal for cleanup. splitLink to route subscriptions.

View repository on GitHub

SKILL.md

The description above is the indexed summary. With JavaScript enabled, this page also loads the SKILL.md text from GitHub.