Skip to content
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

Exclusive RPC queue might exist on reconnect #25

Open
bmario opened this issue Aug 11, 2020 · 0 comments
Open

Exclusive RPC queue might exist on reconnect #25

bmario opened this issue Aug 11, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@bmario
Copy link
Member

bmario commented Aug 11, 2020

If a client loses the connection to the RabbitMQ server, but reconnects fast enough so that the RPC queue still exists, an exception will be thrown:

Traceback (most recent call last):
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aio_pika/robust_connection.py", line 127, in connect
    await channel.reopen()
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aio_pika/robust_channel.py", line 57, in reopen
    await self.restore()
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aio_pika/robust_channel.py", line 70, in restore
    await queue.restore(self)
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aio_pika/robust_queue.py", line 59, in restore
    await self.declare()
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aio_pika/queue.py", line 92, in declare
    self.declaration_result = await asyncio.wait_for(
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
    return await fut
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aiormq/channel.py", line 636, in queue_declare
    return await self.rpc(
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aiormq/base.py", line 168, in wrap
    return await self.create_task(func(self, *args, **kwargs))
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aiormq/base.py", line 27, in __inner
    raise self.exception from e
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py", line 684, in _wrap_awaitable
    return (yield from awaitable.__await__())
  File "/Users/mario/repos/metricq/metricq-sink-websocket/venv/lib/python3.8/site-packages/aiormq/base.py", line 27, in __inner
    raise self.exception from e
aiormq.exceptions.ChannelLockedResource: RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'sink-websocket-test-rpc' in vhost '/'. It could be originally declared on another connection or the exclusive property value does not match that of the original declaration.
@bmario bmario added the bug Something isn't working label Aug 11, 2020
@bmario bmario changed the title Exclusive RPC queue might exists on reconnect Exclusive RPC queue might exist on reconnect Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant