@@ -147,6 +147,8 @@ async def update_stream(
147
147
async def delete_stream (self , name : str ) -> bool :
148
148
"""
149
149
Delete a stream by name.
150
+
151
+ :param stream: The name of the stream from which the consumer should be deleted.
150
152
"""
151
153
resp = await self ._api_request (
152
154
f"{ self ._prefix } .STREAM.DELETE.{ name } " , timeout = self ._timeout
@@ -263,6 +265,12 @@ async def add_consumer(
263
265
return api .ConsumerInfo .from_response (resp )
264
266
265
267
async def delete_consumer (self , stream : str , consumer : str ) -> bool :
268
+ """
269
+ Delete a consumer from a given stream.
270
+
271
+ :param stream: The name of the stream from which the consumer should be deleted.
272
+ :param consumer: The name of the consumer to be deleted.
273
+ """
266
274
resp = await self ._api_request (
267
275
f"{ self ._prefix } .CONSUMER.DELETE.{ stream } .{ consumer } " ,
268
276
b"" ,
@@ -278,6 +286,7 @@ async def consumers_info(
278
286
"""
279
287
consumers_info retrieves a list of consumers. Consumers list limit is 256 for more
280
288
consider to use offset
289
+
281
290
:param stream: stream to get consumers
282
291
:param offset: consumers list offset
283
292
"""
@@ -386,6 +395,9 @@ def _lift_msg_to_raw_msg(self, msg) -> api.RawStreamMsg:
386
395
async def delete_msg (self , stream_name : str , seq : int ) -> bool :
387
396
"""
388
397
delete_msg retrieves a message from a stream based on the sequence ID.
398
+
399
+ :param stream_name: The name of the stream from which the message should be deleted.
400
+ :param seq: The sequence id to delete
389
401
"""
390
402
req_subject = f"{ self ._prefix } .STREAM.MSG.DELETE.{ stream_name } "
391
403
req = {"seq" : seq }
0 commit comments