Skip to content

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

@Mauro-more

Description

@Mauro-more

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions