Tag Archives: [618]basic_consume() got multiple values for keyword argument ‘queue’

[618]basic_consume() got multiple values for keyword argument ‘queue’

Why are there a series of technical challenges behind “OMG buy it”>>>

Today, a PIP install pika was installed on the new server, and then the program connecting to MQ reported an error

Error message: Basic_ Later, I learned that it was a version problem. I looked at the original version of 0.12 and the newly installed version of 1.01

Solution:
method 1: PIP install pika = = 0.12 install version 0.12

Method 2:
put

channel.basic_consume(msg_consumer, queue="hello-queue", consumer_tag="hello-consumer")

Change to

channel.basic_consume("hello-queue", msg_consumer, consumer_tag="hello-consumer")

That’s good. The position of the parameters in the source code has changed

Reference: https://stackoverflow.com/questions/50404273/python-tutorial-code-from-rabbitmq-failing-to-run
https://blog.csdn.net/jiangbo721/article/details/86083394

This article is shared in the blog “Zhou Xiaodong” (CSDN).