-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fix workers support when using Redis PubSub layer #298
Conversation
While looking into this, I realized that the PubSub layer doesn't actually conform to the Channels Layer Spec. In particular, the spec says:
While the PubSub layer is "at-most-once", it doesn't guarantee that a message will only be delivered to a single reader. This has implications for workers as having multiple workers listening to the same channel will result in duplicate messages. A potential solution is to introduce a Redis Streams layer which allows such guarantees. (filed #299 to track this) |
This looks good to me. (Except the PY36 failure, but I agree with @carltongibson that we should drop PY36 in the next release.) |
I've put up #301 to drop PY36. |
@jalaziz Good work. If you want to rebase here I'll take another look tomorrow 🛏️ 🎁 |
The new Redis PubSub layer broke support for Channels workers. Add support for workers by subscribing to non-owned channels instead of throwing an exception. fixes django#270
Was already on it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super, let's have it. Thanks (again) @jalaziz! 🏅
Thank you @jalaziz! Great work 👍, and super valuable. |
Happy to help 😃. On a separate note, any chance this will be released soon? Hoping the pubsub layer will fix various issues we're having with dropped and misordered messages. |
I can roll a release this week I guess... — Anything else to clean up whilst we're here? |
There's the |
3.4.0 is available on PyPI now https://pypi.org/project/channels-redis/ — Thanks all, and particularly @jalaziz on this one! 🎁 |
* Fix workers support when using Redis PubSub layer The new Redis PubSub layer broke support for Channels workers. Add support for workers by subscribing to non-owned channels instead of throwing an exception. Co-authored-by: Carlton Gibson <[email protected]>
The new Redis PubSub layer broke support for Channels workers. Add
support for workers by subscribing to non-owned channels instead of
throwing an exception.
fixes #270