Realtime events for your app, without running a socket server.

Columba is a hosted fan-out service. Your server publishes an event over HTTP, and every client subscribed to that topic receives it over a WebSocket within milliseconds.

Free for every account: 200 concurrent connections and 500,000 messages a day, over as many apps as you like. Need more? Apply for Pro or Enterprise from your dashboard.

Your server publishes
curl -X POST https://columba.velzmith.com/api/v1/publish \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topics": ["user:123"], "event": "message.new", "payload": {"text": "hello"}}'
Your clients receive
import {Socket} from "phoenix"

// Your server's endpoint: checks its own session and answers {"token": "<short-lived JWT>"}.
// In React Native, use your API's full URL and send your app's own auth header instead.
async function fetchToken() {
  const res = await fetch("/columba-token", {credentials: "include"})
  if (res.status === 401) { signedOut = true; socket.disconnect() } // stop reconnecting
  if (!res.ok) throw new Error(`token endpoint answered ${res.status}`)
  return (await res.json()).token
}

let token = null
let signedOut = false
let refreshing = null
const refreshToken = () =>
  (refreshing ||= fetchToken()
    .then((fresh) => { token = fresh })
    .finally(() => { refreshing = null }))

// A function, so every connect and reconnect sends the latest token.
const socket = new Socket("wss://columba.velzmith.com/socket", {params: () => ({token})})
// A refused connect (expired token, rotated secret) is an error like a network drop:
// fetch a fresh token while the client retries with backoff.
socket.onError(() => refreshToken().catch(() => {}))
// Connect even if this first fetch failed (offline, server error): onError retries it.
refreshToken().catch(() => {}).then(() => signedOut || socket.connect())

const channel = socket.channel("topic:user:123")
channel.on("event", (event) => console.log(event.name, event.payload))
channel.join()
  .receive("ok", () => console.log("joined"))
  .receive("error", (reply) => console.error("join refused", reply))