Collaboration

Real-Time Collaboration

Shared state, live editing, broadcast updates. Pub/sub topics scoped per document or workspace.

Collaboration Built on Pub/Sub

MQTT topics map naturally to collaboration patterns. Subscribe to a document, publish changes, and every participant stays in sync.

Shared State Sync

Retained messages keep the latest document state. New participants get the current version on subscribe.

Live Cursors

Publish cursor positions to a dedicated topic. Every participant sees where others are editing in real time.

Broadcast Updates

Publish changes once and every subscriber receives them. No fan-out logic, no WebSocket rooms to manage.

Workspace Isolation

Scoped topics per workspace and document. ACL rules ensure users only access their own projects.

Topic Per Document

Subscribe, Publish, Collaborate

Each document gets a topic hierarchy. Subscribe to changes and cursors on join, publish updates as users edit. The broker handles fan-out to all participants.

Topic Per Document
Each document gets its own topic hierarchy for changes, cursors, and metadata
Retained State
Latest document state is retained so late joiners start from the current version
QoS Guarantees
Choose QoS 0 for cursors (fast) or QoS 1 for edits (reliable)
ACL Per Workspace
Fine-grained access control scoped to workspace, document, or user level
collab.js
// Subscribe to document changes
client.subscribe('docs/doc-123/changes')
client.subscribe('docs/doc-123/cursors')
// Broadcast cursor position
client.publish(
'docs/doc-123/cursors',
JSON.stringify({
user: 'alice',
x: 120, y: 45
})
)

Start Building Collaborative Apps

Add real-time collaboration to your app with pub/sub topics. Free tier included.