Open dizpers opened 10 years ago
It seems like that resetting rabbitmq helps me. RabbitMQ logs contained following:
=ERROR REPORT==== 6-Jun-2014::01:26:46 ===
connection <0.3637.0>, channel 1 - soft error:
{amqp_error,precondition_failed,
"cannot redeclare exchange 'test_exchange' in vhost '/' with different type, durable, intern...",
'exchange.declare'}
=WARNING REPORT==== 6-Jun-2014::01:26:46 ===
closing AMQP connection <0.3637.0> (127.0.0.1:34669 -> 127.0.0.1:5672):
connection_closed_abruptly
but the most interesting thing - that exchange declaration code doesn't changed during multiple test running =)
Likely what happened is that the channel closed between when it was declared and when you attempted to publish, likely due to the protocol error you noted. Did you find a bug in your tests or is there a problem with exchange.declare
?
I think exchange.declare
is fine. I did't get this error since I rewrite my tests.
Closing the channel ( channel.close()
) and then calling channel.basic
may cause this error
Yeah I just proposed in #61 a change to closed channels that would make it much clearer to the user.
Hi! I write functional tests for my project, where I create RabbitMQ consumer using haigha =) There are both test producer and consumer in functional tests (started one by one). The producer randomly fails - opened channel closes randomly. When channel closed - no info is provided to close cb.
The only error I get is
AttributeError: 'Channel' object has no attribute 'basic'
:What may cause this? How I can get more info from channel close callback? TIA!
PS The only cause I see for now is that consumer and producer started together.