In the past few days, the rabbitmq consumer mode has been unable to be turned on, and the following error has occurred:
builtins.TypeError: basic_consume() got an unexpected keyword argument 'no_ack'
This sentence means: The call to the method
basic_consume() has an unexpected keyword
That is, the keyword
no_ack in this method, right?
So I invoked the prompt parameter of
basic_consume in pycharm, as shown below:
no_ack keyword is correct, I re-entered it, uploaded it to the server and still got the same error.
So I searched and went to the rabbitmq official website to see the latest documentation. There is no problem.
Next, I found the official
pika documentation that caught my attention.
I compared my
pikia version to
1.1.0, and then I found the problem, and sure enough, the keywords changed.
basic_consume(queue, auto_ack=False, exclusive=False, consumer_tag=None, arguments=None)
Change it to