-
Notifications
You must be signed in to change notification settings - Fork 196
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
Support out-of-process "group_add" and "group_discard" for PubSub channel layer #264
Comments
I think this is going to be a fundamental limitation of pubsub as opposed to anything specific to the implementation. |
Yeah, to be fair, I haven't given much thought to how it could work with pubsub. I also haven't yet tried the workaround I outlined above. Hope to get to it this weekend to get a better idea of how big of a limitation this is. |
The workaround you mention should be the proper way to handle it. It cleaner. The method you're current using is possible through sheer accident of redis architecture at the time. |
Yes, IMO this is how it should be done. If you know the channel name of a consumer (seems that you do), it is safe to call Definitely less convenient, but IMO it's the most robust way to solve it. |
Closing this as the workaround of sending messages back to the original consumer to manage groups seems to work fine. |
In #247, this comment explain why the initial implementation of the PubSub channel layer does not support out-of-process
group_add
(and by extension,group_discard
).However, I believe this is a bigger limitation than it might seem at first. In our case, the issue is not so much a consumer subscribing a
different
consumer, but rather being able to dynamically subscribe and unsubscribe a consumer from normal HTTP activity.In our case, this comes into play in a couple different scenarios:
I do realize that both these scenarios are possible by sending the Consumers a custom "command" message to have them call
group_add
andgroup_discard
in-process, but it would be nice to not have to add the extra logic in our app layer for something this foundational.The text was updated successfully, but these errors were encountered: