@@ -0,0 +1,911 @@
+#!/usr/bin/env python%0Aimport pika%0A%0Aconnection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))%0A%0Achannel = connection.channel()%0A%0Achannel.queue_declare(queue='rpc_queue')%0A%0Adef fib(n):%0A    if n == 0:%0A        return 0%0A    elif n == 1:%0A        return 1%0A    else:%0A        return fib(n-1) + fib(n-2)%0A%0Adef on_request(ch, method, props, body):%0A    n = int(body)%0A%0A    print(%22 %5B.%5D fib(%25s)%22 %25 n)%0A    response = fib(n)%0A%0A    ch.basic_publish(exchange='',%0A                     routing_key=props.reply_to,%0A                     properties=pika.BasicProperties(correlation_id = %5C%0A                                                         props.correlation_id),%0A                     body=str(response))%0A    ch.basic_ack(delivery_tag = method.delivery_tag)%0A%0Achannel.basic_qos(prefetch_count=1)%0Achannel.basic_consume(on_request, queue='rpc_queue')%0A%0Aprint(%22 %5Bx%5D Awaiting RPC requests%22)%0Achannel.start_consuming()%0A

Add rabbitmq request reply server