Stream

XDEL

Removes the specified entries from a stream, and returns the number of entries deleted.

Arguments

keybodystrrequired

The key of the stream.

idsbodystrrequired

The ID(s) of the message(s) to delete. Can be multiple IDs as separate arguments.

Response

int

The number of entries actually deleted from the stream.

Single message
result = redis.xdel("mystream", "1638360173533-0")
Multiple messages
result = redis.xdel("mystream", "1638360173533-0", "1638360173533-1", "1638360173533-2")
Loading search…