@@ -7,10 +7,16 @@ channels_redis
7
7
.. image :: https://img.shields.io/pypi/v/channels_redis.svg
8
8
:target: https://pypi.python.org/pypi/channels_redis
9
9
10
- A Django Channels channel layer that uses Redis as its backing store, and supports
11
- both a single-server and sharded configurations, as well as group support. Requires
12
- Python 3.6 or higher to function correctly (3.5 will look like it works, but have
13
- random errors).
10
+ Provides Django Channels channel layers that use Redis as a backing store.
11
+
12
+ There are two available implementations:
13
+
14
+ * ``RedisChannelLayer `` is the orignal layer, and implements channel and group
15
+ handling itself.
16
+ * ``RedisPubSubChannelLayer `` is newer and leverages Redis Pub/Sub for message
17
+ dispatch.
18
+
19
+ Both layers support a single-server and sharded configurations.
14
20
15
21
**Note: ** Prior versions of this package were called ``asgi_redis `` and are
16
22
still available under PyPI as that name if you need them for Channels 1.x projects.
@@ -165,7 +171,7 @@ If you're using Django, you may also wish to set this to your site's
165
171
}
166
172
167
173
``on_disconnect `` / ``on_reconnect ``
168
- ~~~~~~~~~~~~
174
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169
175
170
176
The PubSub layer, which maintains long-running connections to Redis, can drop messages in the event of a network partition.
171
177
To handle such situations the PubSub layer accepts optional arguments which will notify consumers of Redis disconnect/reconnect events.
@@ -194,8 +200,8 @@ And then in your channels consumer, you can implement the handler:
194
200
Dependencies
195
201
------------
196
202
197
- Redis >= 5.0 is required for `channels_redis `. It supports Python 3.5.2 and up
198
- (3.5.0 or 3.5.1 will not work due to our dependency, `` aioredis ``).
203
+ Redis >= 5.0 is required for `channels_redis `. Python 3.6 or higher is required.
204
+
199
205
200
206
Contributing
201
207
------------
0 commit comments