Hopefully this is gonna make sense. I am building an app using django-channels that works a little bit like a quiz - there is a host, and multiple players. When something goes wrong in the player side of the house I want the specific player consumer to send a message to the host group - which is easy enough. Unfortunately, because all player consumers need to be attached to the host group to send messages, they also receive those and send them to their connected clients. Thus if an issue occurs with player 1's consumer, it ultimately gets broadcast to player 2, player 3, etc, when all I want to do is alert the host.
I've thought about doing this with a 'no-handle' flag in such messages, but is there a cleaner method of doing what I want?
Turns out this was a lot simpler than I expected. group_add()
subscribes to messages, but without that step it is still possible to group_send()
to a group - so an exception processing player 1 can be sent to the host group without any players receiving messages in that group.