mosquito / aio-pika

AMQP 0.9 client designed for asyncio and humans.
https://aio-pika.readthedocs.org/
Apache License 2.0
1.18k stars 186 forks source link

client_properties cannot be passed to aio_pika.connect_robust in 8.0.2 #468

Closed viiand closed 2 years ago

viiand commented 2 years ago

Hey there. I found an issue with the 8 version. client_properties cannot be passed to the aio_pika.connect_robust/connect anymore.

The problem seems to be the refactoring of the connect/connect_robust method.

Now it passes the client_properties to make_url() which does not expect it, thus is becomes kwargs.

make_url(... **kwargs):
...
kw = kwargs # <- {'client_properties': {'connection_name': 'A writer connection'}}`
...
return URL.build(
        ....
        query=kw)

yarl url.build should get {'connection_name': 'A writer connection'}, not {'client_properties': {'connection_name': 'A writer connection'}}

The fix is, imho to add client_properties to the make_url arguments, and merge it with kw (similarly to the ssl_options).

viiand commented 2 years ago

well, I added the PR #469 fix

mosquito commented 2 years ago

@viiand thank you for your contribution, following fixes released in 8.0.3