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
basic_publish of BlockingConnection does not raise exception after server down #357
Comments
You need to add |
Thanks! But I got another problem. When I added channel.confirm_delivery(), I got following exception: Traceback (most recent call last): I'm hoping it would raise a ConnectionError or ChannelError, but why this? Do I miss something? Or it should be like this? |
That might be something worth looking into as I would also expect a proper Exception to be sent. I'll see what I can find out, but Gavin should be able to provide us with a better insight into this. |
Thanks a lot! I will handle the AtrributeError in my code, but it should be a proper exception. I will leave this open to track this improper exception problem. |
I'll submit a fix in a couple of minutes.
|
Thanks for help! |
Was wondering whether this issue has been fixed or not? I copied the posted code, and added the line "channel.confirm_delivery()", But for me, the basic_publish functions hangs there. Done think it matters, but my os: Ubuntu 10.04.4 LTS Thank you in advace |
After I hit ctrl-c, I see this: File "./test1.py", line 21, in Thanks |
Please ignore the previous post, regarding the ctrl-c, the code was trying to close the connection to the server, which is not accessible anymore. |
We're using pika to connect rabbitmq, but in some condition, there's a chance that the basic_publish method still works even when server's down, and after restarting, the messages are missing. I tested with both the latest stable version(0.9.13) and the code in master in github.
Here is the script I used for test:
After the connection was made, I stopped the rabbitmq-server, but it kept printing "send N messages". I tested under ubuntu 12.04, python version is 2.7.3.
Please help fix this ASAP, we're using pika in product.
The text was updated successfully, but these errors were encountered: