-
Notifications
You must be signed in to change notification settings - Fork 36
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
Exception: 'Deliver' object has no attribute 'body_size' #3
Comments
Hey! I'll take a look tonight and sort it out. |
I don't see why, or how you could have received two Deliver frames in a row, that must be a bug in RabbitMQ. What version are you running? Are you running multiple threads when consuming? I pushed a minor fix, do you think you could clone the repo and try it out and if possible could you make sure that you are not losing any messages? |
RabbitMQ: 3.4.4 I'm not running multiple threads, I just created one thread to call channel.start_consuming() Yes I can clone it but did you push your code? The last commit was 4 days ago |
I forgot to run git push. It should be there now! =] @e3d93dea99472f247e0e1d7ae9117d02f70bcbea |
@viniciuschiele Could you show me the contents of the two Deliver objects if it happens again? |
I put no_ack=True to test and I lost all messages from the queue so I can't reproduce it again, I will have to wait until the other system to send new invalid messages, it might take some time :/ Next time I will try to set the prefetch_count |
My guess is that it was a bug, for some reason only the first frame (out of 3) was received from RabbitMQ. I guess it could have been a network issue? With the patch I gave you it shouldn't crash, but if you have no_ack set to true, it could mean that you lose a message which is bad. |
@eandersson Today I was able to reproduce this issue again, so I just set prefetch_count=1 and it have solved this issue. Next time I will increase prefetch_count to see what will happen. Thanks! |
So I am pretty sure this is a RabbitMQ bug. Do you know what language and library is used to send the messages? Any details I could use to try to reproduce this would be helpful. |
@eandersson I set prefetch_count to 10 and it has worked well, to me it solves this issue, I think you could close it. I don't know what library they are using to send the messages because this software is not ours. Thanks for your time. |
No worries @viniciuschiele. Thanks for the report and glad you got it sorted. |
I have been experiencing a strange error, just for some messages I got this error:
'Deliver' object has no attribute 'body_size'
channel.py (line: 253)
I looked at self._inbound and I saw some Deliver objects in sequence instead of Deliver/ContentHeader/ContentBody
The messages are being sent to the queue by another project in another language, so I have no clue why it is happening.
The text was updated successfully, but these errors were encountered: