SupabaseS
Supabase3mo ago
Sebas

Broadcasting not emitting events

I am having some issues getting broadcasting to work locally. I have created a very permissive migration (see screenshot) to test.
It follows the official Supabase documentation on how to setup broadcasting and, for confirmation that it is actually triggering the function, I also add a record to the broadcast_debug_log table.

When I run my application, I can confirm that there are records being inserted in the table, but no broadcast events are emitted.
I am using the realtime inspector as
service_role
to subscribe to the channel topic:worker_run_tracking_changes and I see the postgres_changes events coming in but no broadcast events

I also have a realtime-listener.js script (see screenshots as well) that listens for events that is also not receiving any of the broadcast messages.
The only messages I see are ones that I manually trigger through another JS script:
  const payload = {
    msg: "🚀 Hello from broadcaster!",
    time: new Date().toISOString(),
    pid: process.pid,
  };

  const result = await channel.send({
    type: "broadcast",
    event: "manual_test",
    payload,
  });
  console.log("📬 Broadcast result:", result);


What might I be doing wrong? Why isn't the broadcasting working?
image.png
image.png
image.png
Was this page helpful?