Install
| SDK | Language / Platform |
|---|---|
| centrifuge-js | JavaScript — browser, Node.js, React Native |
| centrifuge-python | Python (asyncio) |
| centrifuge-go | Go |
| centrifuge-dart | Dart / Flutter |
| centrifuge-swift | Swift (iOS) |
| centrifuge-java | Java / Android |
| centrifuge-csharp | C# (.NET, MAUI, Unity) |
Connect
Fetch a token using your API key, then instantiate and connect the Centrifuge client. You only need one client instance — all channel subscriptions are multiplexed over the single connection. If you need more than 512 subscriptions, create additional client instances (each connection supports up to 512 channels). See Limits for details.Subscribe to a channel
Once connected, create a subscription for the channel you want. All channel pages in this section use this same pattern — replace"channel:name" with the channel name format documented on each page.
ctx object with the following structure:
ctx.data is the channel payload documented on each channel’s reference page. ctx.tags.messageId is a UUID present on every publication — use it to deduplicate messages during history recovery (see Real-time Data → Dedup).
