Skip to content

Commit

Permalink
fix: add group/consumer to hash to avoid overwriting (#1463)
Browse files Browse the repository at this point in the history
Co-authored-by: zumuta <[email protected]>
Co-authored-by: Kumaran Rajendhiran <[email protected]>
  • Loading branch information
3 people authored May 24, 2024
1 parent 44de4c9 commit f3bc25c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions faststream/redis/schemas/stream_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

0 comments on commit f3bc25c

Please sign in to comment.