Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

RabbitMQ Server - cheat sheet -

939 views

Published on

RabbitMQ Server - cheat sheet -

23-Mar-2016
SAKURA Internet Research Center.
Senior Researcher / Naoto MATSUMOTO

Published in: Technology
  • Be the first to comment

RabbitMQ Server - cheat sheet -

  1. 1. 23-Mar-2016 SAKURA Internet Research Center. Senior Researcher / Naoto MATSUMOTO
  2. 2. RabbitMQ:AMQP Send/Recv # cat /etc/redhat-release ; uname -sr CentOS Linux release 7.2.1511 (Core) Linux 3.10.0-327.3.1.el7.x86_64 # wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm # rpm -Uvh erlang-solutions-1.0-1.noarch.rpm # yum install erlang -y # curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash # yum -q makecache -y --disablerepo='*' --enablerepo='rabbitmq_rabbitmq-server' # yum install rabbitmq-server # service rabbitmq-server start import pika con = pika.Blockingcon(pika.conParameters(host='localhost')) ch = con.ch() ch.queue_declare(queue='hello') ch.basic_publish(exchange='', routing_key='hello', body='Hello World!') con.close() import pika con = pika.Blockingcon(pika.conParameters(host='localhost')) ch = con.ch() ch.queue_declare(queue='hello') def callback(ch, method, properties, body): print(" [x] Received %r" % body) ch.basic_consume(callback, queue='hello', no_ack=True) ch.start_consuming() RabbitMQ Server

×