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

channel_layer.group_add with already existing group removes the group #354

Open
Mauro-more opened this issue Mar 11, 2023 · 1 comment
Open

Comments

@Mauro-more
Copy link

Mauro-more commented Mar 11, 2023

I am using channels_redis as backend to GraphQL subscriptions.

Upon subscription I subscribe a user to a number of groups, which works as expected. But if in the meantime I change the subscription parameters and call group_add with a different set of groups, the groups that exist on both "previous subscription parameters" and "next subscription parameters" get deleted from channels.

Example: 
    Initial subscription parameters:
        - Group_A
        - Group_B
        - Group_C
    
    Final result:
        - Channels successfully subscribes to all 3 groups
        

    Next subscription parameters:
    - Group_A
    - Group_D

    Final result:
       - Channels subscribes only to Group_D

Is there any config to change this behaviour? Is it a bug? Did anyone experienced it?

Thanks for this awesome project.

@sevdog
Copy link
Contributor

sevdog commented Apr 14, 2023

Which redis layer are you using, channels_redis.core.RedisChannelLayer or channels_redis.pubsub.RedisPubSubChannelLayer?

Can you provide a code snippets which reproduces your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants