aio-pika
aio-pika copied to clipboard
AMQP 0.9 client designed for asyncio and humans.
…that belong to that consumer subscription.
Hi my application is using aio-pika=9.4.1 to connect to a rabbitmq. I'm testing under docker environment and if I manually shutdown rabbit I see following log messages: ``` Unexpected connection...
Hi all, I am trying to connect to rabbitmq server with `aio_pika` and use tls to protect the connection, but I am encountering and `ConnectionResetError` with no other explanation. I...
Based on documentation https://aio-pika.readthedocs.io/en/latest/apidoc.html#aio_pika.connect_robust My code: ```python async def run_client(self): self.loop = asyncio.get_running_loop() connection = await connect_robust( host=self.cfg.host, port=self.cfg.port, virtualhost=self.cfg.vhost, login=self.cfg.user, password=self.cfg.password, timeout=5, client_properties={'connection_name': 'a-adapter'} ) channel = None try:...
The type annotation for the return value for the `Exchange.publush()` method is: `Ack | Nack | Reject | None`. Looking at the implementation, it seems to me that if the...
async def disconnect(self): if self.connection and not self.connection.is_closed: logger.info(f"close RabbitMQ connection1") try: await self.connection.close() logger.info(f"close RabbitMQ connection2") except Exception as e: logger.error(f"Failed to close RabbitMQ connection: {e}") async def on_shutdown():...
From the documentation of `RPC.create()`: ``` rpc = await RPC.create(channel, host_exceptions=True) ``` However, trying that: ``` Traceback (most recent call last): File "/media/Scripts/book_cat/rabbit/rpc_llama.py", line 341, in run() File "/media/Scripts/book_cat/rabbit/rpc_llama.py", line...
I was trying to figure out how to configure timeouts for a channel. Apparently this is done via `channel.set_qos()`, but that function does not exist in the documentation (https://aio-pika.readthedocs.io/en/latest/apidoc.html#aio_pika.Connection.channel). I...