5
Realtime Client can subscribe multiple times to same channel
Source: supabase/supabase#27473 · opened by @grokpot
Use Case:
I have a page which has a table of objects.
When clicking on an object in the table, a modal opens.
The user can perform an async task on that object.
When the async task is running, the modal shows a loading spinner.
The table on the page also shows a loading spinner (in case the user closes the modal and comes back later)
In my async task queue, I send a broadcast realtime update when it's done.
Ideally, both the page and the modal receive the update and remove their loading spinners.
Current Behavior:
I've found that the client cannot subscribe multiple times to the same channel. As soon as the second connection is established, the first no longer subscribes.
This is also confirmed here:
Possible Workaround:
A channel manager middleware. I'll post it in the comments
Ideal Solution:
realtime-js allows this natively
I have a page which has a table of objects.
When clicking on an object in the table, a modal opens.
The user can perform an async task on that object.
When the async task is running, the modal shows a loading spinner.
The table on the page also shows a loading spinner (in case the user closes the modal and comes back later)
In my async task queue, I send a broadcast realtime update when it's done.
Ideally, both the page and the modal receive the update and remove their loading spinners.
Current Behavior:
I've found that the client cannot subscribe multiple times to the same channel. As soon as the second connection is established, the first no longer subscribes.
This is also confirmed here:
Possible Workaround:
A channel manager middleware. I'll post it in the comments
Ideal Solution:
realtime-js allows this natively
No pledges yet. Be the first to back this.
Comments
Similar requests
Make Changes to the DB through a Realtime extension
2 votes · 0 comments
Using multiple filters with Supabase Realtime docker container
2 votes · 0 comments
Broadcast a message to multiple channels
1 vote · 0 comments
Realtime Channel Authentication
18 votes · 0 comments
Realtime channel initial value on channel creation
3 votes · 0 comments
No comments yet.