summaryrefslogtreecommitdiff
path: root/redis/commands.py
diff options
context:
space:
mode:
authorAvital Fine <79420960+AvitalFineRedis@users.noreply.github.com>2021-08-30 09:34:23 +0300
committerGitHub <noreply@github.com>2021-08-30 09:34:23 +0300
commitefdba1a77a2755c70ba9754aa592dde8c8c50217 (patch)
tree4233c037d0d1c2a2bac69a1648dc04b7f3f12f12 /redis/commands.py
parent41e3f56f65b690ae39ab798a85b42e44ee72a829 (diff)
downloadredis-py-efdba1a77a2755c70ba9754aa592dde8c8c50217.tar.gz
xgroup_createconsumer (#1553)
Diffstat (limited to 'redis/commands.py')
-rw-r--r--redis/commands.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/redis/commands.py b/redis/commands.py
index a9b90f0..29877db 100644
--- a/redis/commands.py
+++ b/redis/commands.py
@@ -1870,6 +1870,18 @@ class Commands:
"""
return self.execute_command('XGROUP DESTROY', name, groupname)
+ def xgroup_createconsumer(self, name, groupname, consumername):
+ """
+ Consumers in a consumer group are auto-created every time a new
+ consumer name is mentioned by some command.
+ They can be explicitly created by using this command.
+ name: name of the stream.
+ groupname: name of the consumer group.
+ consumername: name of consumer to create.
+ """
+ return self.execute_command('XGROUP CREATECONSUMER', name, groupname,
+ consumername)
+
def xgroup_setid(self, name, groupname, id):
"""
Set the consumer group last delivered ID to something else.