From 16494a9f3892e2c6d0398ef37f6f28f10a1edee2 Mon Sep 17 00:00:00 2001 From: zumuta Date: Thu, 23 May 2024 21:09:49 +0200 Subject: [PATCH] fix: add group/consumer to hash to avoid overwriting --- faststream/redis/schemas/stream_sub.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/faststream/redis/schemas/stream_sub.py b/faststream/redis/schemas/stream_sub.py index 0aa2a34145..7ab768cb28 100644 --- a/faststream/redis/schemas/stream_sub.py +++ b/faststream/redis/schemas/stream_sub.py @@ -57,4 +57,8 @@ def __init__( self.max_records = max_records def __hash__(self) -> int: + if self.group is not None: + return hash( + f"stream:{self.name} group:{self.group} consumer:{self.consumer}" + ) return hash(f"stream:{self.name}")