Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres Changes Channel name clarification #1252

Closed
JunzheFan opened this issue Dec 20, 2024 · 0 comments
Closed

Postgres Changes Channel name clarification #1252

JunzheFan opened this issue Dec 20, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@JunzheFan
Copy link

JunzheFan commented Dec 20, 2024

Improve documentation

Link

Add a link to the page which needs improvement (if relevant)

Describe the problem

  const channelA = supabase
    .channel('schema-db-changes')
    .on(
      'postgres_changes',
      {
        event: '*',
        schema: 'public',
      },
      (payload) => console.log(payload)
    )
    .subscribe()

I am confused with the channel name parameters for listenting to database changes, let's say if i have 10 users who installed my desktop application, and they are listening to the same table for changes, do I need to generate a different channel name myself for each of the user or they can share the same channel name? and in terms of unsubscribe, if I do supabase.removeChannel(myChannel) for a user user, will the other 9 users will also get unsubscribed if the channel name was the same when creating the client instance ? For the current doc page , it just says the name can be any string value which could cause concern

@JunzheFan JunzheFan added the documentation Improvements or additions to documentation label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant