Skip to content

Commit

Permalink
Merged in from Main
Browse files Browse the repository at this point in the history
  • Loading branch information
sifex committed May 18, 2024
1 parent 051aef8 commit b6d7068
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions faststream/kafka/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ async def publish( # type: ignore[override]
return_value = None

for handler in self.broker._subscribers.values(): # pragma: no branch
call = False

# for p in handler.partitions:
# if p.topic == topic and (partition is None or p.partition == partition):
# call = True
for p in handler.partitions:
if p.topic == topic and (partition is None or p.partition == partition):
call = True

if topic in handler.topics:
return await call_handler(
call = True

if call:
handle_value = await call_handler(
handler=handler,
message=[incoming]
if isinstance(handler, AsyncAPIBatchSubscriber)
Expand Down

0 comments on commit b6d7068

Please sign in to comment.