code: def send_sync(self, body, exchange, key):
          
          callback_queue = self.declare_queue(exclusive=True,
                                              auto_delete=True)  # 得到随机回调队列名
          self._channel.basic_consume(self.on_response,   # 客户端消费回调队列
                                      no_ack=True,
                                      queue=callback_queue)
  
          corr_id = str(uuid.uuid4())  # 生成客户端请求id
          self.data[corr_id] = {
              'isAccept': False,
              'result': None,
              'callbackQueue': callback_queue
          }
          self._channel.basic_publish( # 发送数据给服务端
              exchange=exchange,
              routing_key=key,
              body=body,
              properties=pika.BasicProperties(
                  reply_to=callback_queue,
                  correlation_id=corr_id,
              )
          )
  
          while not self.data[corr_id]['isAccept']:  # 判断是否接收到服务端返回的消息
              self._connection.process_data_events()
              time.sleep(0.3)
              continue
  
          logger.info("Got the RPC server response => {}".format(self.data[corr_id]['result']))
          return self.data[corr_id]['result']
docs: 发送并同步接受回复消息
          :return: