📅  最后修改于: 2023-12-03 15:18:35.091000             🧑  作者: Mango
pika.exceptions.channelclosedbybroker
is a Python exception that is raised when a channel is closed by the broker due to a precondition failure. This particular exception occurs when there is a mismatch between the durable
argument of a queue in a vhost and its counterpart on the broker.
The error message associated with pika.exceptions.channelclosedbybroker
is:
(406,"precondition_failed - vhost 'fx' queue 'fx-naas' not equivalent arg 'durable': r')
There are a few possible reasons why this exception may be raised:
durable
argument of the queue was set to False
on the client side, but the broker expects it to be True
.durable
argument of the queue was set to True
on the client side, but the broker expects it to be False
.To resolve this issue, you can try the following steps:
durable
argument of the queue matches what is expected on the broker side.In summary, pika.exceptions.channelclosedbybroker
is an error that can occur when there's a mismatch between the properties of a queue in a vhost and its counterpart on the broker. By following the steps outlined above, you can resolve this issue and ensure that your code runs smoothly.