-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
975 use aio pika pool #1401
base: main
Are you sure you want to change the base?
975 use aio pika pool #1401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! Looks good, but I will be able to look closer after May weekends in Russia. Also, can you please set default max_channels number to 1? I don't want to change default behavior for our users.
Sure, will do! |
faststream/rabbit/broker/broker.py
Outdated
@@ -346,23 +357,34 @@ async def _connect( # type: ignore[override] | |||
*, | |||
timeout: "TimeoutType", | |||
ssl_context: Optional["SSLContext"], | |||
max_connection_pool_size: int = 1, | |||
max_channel_pool_size: int = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you plase add these options with Annotated[..., Doc()]
declaration to RabbitBroker.__init__
and FastAPI integration router init method too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, it's done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, just add type annotations in broker and FastAPI router init methods and we'll merge it
Thank you for the work! I am planning a some new RabbitMQ features soon. So, I'll merge it after #1383 as a first step of RMQ changes |
Description
Use aio-pika pools for handling rabbit connections and channels
Fixes #975
Type of change
Please delete options that are not relevant.
Checklist
scripts/lint.sh
shows no errors)scripts/test-cov.sh
scripts/static-anaylysis.sh