You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duplicate Join Subscriptions
While the client may join any number of topics on any number of channels, the client may only hold a single subscription for each unique topic at any given time. When attempting to create a duplicate subscription, the server will close the existing channel, log a warning, and spawn a new channel for the topic. The client will have their channel.onClose callbacks fired for the existing channel, and the new channel join will have its receive hooks processed as _normal.
Currently creating additional subscriptions to same table (or same table and exact filter) generate a new subscription.
To Reproduce
create multiple subscriptions to the same table and filter
Expected behavior
Based on the documentation, and I think the intent of the code, reusing a subscription should not create a new one.
I assumed it would so do not keep track of closing subscriptions when I renew.
This obviously can be handled by keeping track of subscriptions and closing them, but is a waste if realtime.js is supposed to handle it.
When dealing with connections going online and offline part of my code restarts subscriptions as part of a bigger block of code to reload the data being monitored in realtime as it state is no longer valid if connection goes offline.
Screenshots
System information
supabase 1.29.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Bug report
Documentations for realtime.js says:
Currently creating additional subscriptions to same table (or same table and exact filter) generate a new subscription.
To Reproduce
create multiple subscriptions to the same table and filter
Expected behavior
Based on the documentation, and I think the intent of the code, reusing a subscription should not create a new one.
I assumed it would so do not keep track of closing subscriptions when I renew.
This obviously can be handled by keeping track of subscriptions and closing them, but is a waste if realtime.js is supposed to handle it.
When dealing with connections going online and offline part of my code restarts subscriptions as part of a bigger block of code to reload the data being monitored in realtime as it state is no longer valid if connection goes offline.
Screenshots
System information
supabase 1.29.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: