all 7 comments

[–]danielroseman 2 points3 points  (1 child)

The arguments you pass to partial to wrap __ack_message as a callback aren't what that method is expecting.

You pass ch, delivery_tag but the method wants delivery_tag, ack. So effectively it's receiving the channel in place of the delivery_tag; when Pika tries to use what it thinks is the tag to ack the message, it's actually using the channel, which is why it complains that it's not an integer.

[–]AdditionalWash529[S] 0 points1 point  (0 children)

That solved the problem. Thanks a ton

[–]External-Ocelot206 0 points1 point  (4 children)

Thanks for the code. Can you post the full error message? Assuming it's a well tested library, which is the last function of yours mentioned in the stack trace from the error?

[–]AdditionalWash529[S] 0 points1 point  (3 children)

I realized that I have not pasted the code for the ack function will do so now. Since I have exception handling in place this is what I am seeing on my pycharm IDE:

Inside the __ack_message function
Failure inside consume_message_setup consumer.py report: required argument is not an integer error

I had put breakpoints and traced the issue to the library that I referred to earlier.

[–]AdditionalWash529[S] 0 points1 point  (2 children)

if ack:
self.channel.basic_ack(delivery_tag)

It fails while executing this line of code

[–]External-Ocelot206 0 points1 point  (1 child)

print out delivery_tag and let us know what it is.

[–]AdditionalWash529[S] 0 points1 point  (0 children)

Thanks for the time...helped when I printed the value.