Skip to content

Commit

Permalink
Fix: add consume one & max_workers to router
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Dumchenko committed Dec 3, 2024
1 parent 794f39b commit 9788188
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions faststream/confluent/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,16 @@ def __init__(
bool,
Doc("Whetever to include operation in AsyncAPI schema or not."),
] = True,
max_workers: Annotated[
int,
Doc("Number of workers to process messages concurrently."),
] = 1,
) -> None:
super().__init__(
call,
*topics,
publishers=publishers,
max_workers=max_workers,
partitions=partitions,
polling_interval=polling_interval,
group_id=group_id,
Expand Down
2 changes: 1 addition & 1 deletion faststream/confluent/subscriber/usecase.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async def _consume(self) -> None:
connected = True

if msg is not None:
await self.consume(msg)
await self.consume_one(msg)

@property
def topic_names(self) -> List[str]:
Expand Down

0 comments on commit 9788188

Please sign in to comment.