Skip to content

Commit

Permalink
fix: add group/consumer to hash to avoid overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
zumuta committed May 23, 2024
1 parent 6c667ff commit 16494a9
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 16494a9

Please sign in to comment.