CHANNELS

Real-time channels for every client

Named channels deliver live updates over WebSocket and REST. Publish once — browsers, mobile apps, and backends subscribe on the same surface.

import { QPub } from "@qpub/sdk";

const channel = new QPub.Socket({ apiKey: "…" })
  .channels.get("orders");

await channel.subscribe((m) => …);
await channel.publish({ … }, { event: "…" });

Global edge delivery

Channels ride QPub’s distributed network so subscribers connect close to where messages originate.

How the network works

One publish, many subscribers

Channels are the fan-out primitive for live product experiences — chat threads, live metrics, device telemetry, and collaborative state.

  • Subscribe with the Socket SDK or receive pushes from your backend
  • Scale concurrent subscribers without managing your own broker
  • Keep channel names aligned with your product domains

Channel concepts →

PublishWebMobileServerDashboardIoTWorker

Publish from anywhere

Not every producer runs a WebSocket client. Use REST to publish from cron jobs, webhooks, or serverless handlers into the same channel subscribers already use.

  • Same channel namespace for Socket and REST publishers
  • Ideal for backend-triggered alerts and integrations
  • Pair with API keys and project-scoped auth

REST channels API →

POST /v1/channel/alerts/messages

{ "messages": [{ "data": { … } }] }

Server-side publish without a persistent WebSocket connection.

Socket path

  • ·Long-lived connection for subscribe and publish
  • ·Best for interactive and mobile clients
  • ·Handles reconnection and channel resumption

REST path

  • ·Stateless publish from servers and jobs
  • ·No client SDK required on the producer
  • ·Same delivery path to active subscribers

Frequently asked questions

How is a channel different from a queue?
Channels fan out live messages to subscribers that are connected now. Queues store jobs for workers to pull, retry, and complete asynchronously.
Can I publish without the Socket SDK?
Yes. REST publish targets the same channel names your Socket subscribers use.
Where do I see limits and pricing?
Concurrent channels and message volume depend on your plan. Compare options on the pricing page or in QPub Cloud after signup.
Ship your first live channel
Live in Minutes