def request(ch, method, props, body):
print(" [.] increase(%s)" % (body,))
response = increase(int(body))
#???????????????correlation_id???
ch.basic_publish(exchange='',
routing_key=props.reply_to,
properties=pika.BasicProperties(correlation_id = \
props.correlation_id),
body=str(response))
ch.basic_ack(delivery_tag = method.delivery_tag)
评论列表
文章目录