错误原因:pika.BasicProperties和pika.ConnectionParameters用混了
错误代码:
self.channel.basic_publish(exchange='', routing_key='rpc_queue', properties=pika.ConnectionParameters( reply_to=self.callback_queue,correlation_id=self.corr_id,)
修改正确的代码:
self.channel.basic_publish(exchange='', routing_key='rpc_queue', properties=pika.BasicProperties( reply_to=self.callback_queue, correlation_id=self.corr_id, ),