rabbitmq-tutorials/python
Brian Stajkowski 56e7678246 Correct Emit Log Direct
Sys.argv will always be greater than 1, but in the instance
where the severity is supplied it would be greather than 2.
2016-12-19 12:37:41 -08:00
..
emit_log_direct.py Correct Emit Log Direct 2016-12-19 12:37:41 -08:00
emit_log_topic.py Fix: deprecation warning for type in exchange_declare 2016-09-06 15:02:49 +05:30
emit_log.py Fix: deprecation warning for type in exchange_declare 2016-09-06 15:02:49 +05:30
new_task.py Fix Python scripts for Python 3 compatibility. 2015-11-11 17:32:37 +00:00
README.md updated README for pika 0.10.0 2015-09-23 17:38:16 +01:00
receive_logs_direct.py Fix: deprecation warning for type in exchange_declare 2016-09-06 15:02:49 +05:30
receive_logs_topic.py Fix: deprecation warning for type in exchange_declare 2016-09-06 15:02:49 +05:30
receive_logs.py Fix: deprecation warning for type in exchange_declare 2016-09-06 15:02:49 +05:30
receive.py Print later 2015-12-21 06:07:42 +03:00
rpc_client.py Fix Python scripts for Python 3 compatibility. 2015-11-11 17:32:37 +00:00
rpc_server.py Fix Python scripts for Python 3 compatibility. 2015-11-11 17:32:37 +00:00
send.py Fix Python scripts for Python 3 compatibility. 2015-11-11 17:32:37 +00:00
worker.py Fix Python scripts for Python 3 compatibility. 2015-11-11 17:32:37 +00:00

Python code for RabbitMQ tutorials

Here you can find Python code examples from RabbitMQ tutorials.

To successfully use the examples you will need a running RabbitMQ server.

Requirements

To run this code you need pika library version 0.10.0 To install it run

pip install pika==0.10.0

You may first need to run

easy_install pip

Code

Tutorial one: "Hello World!":

python send.py
python receive.py

Tutorial two: Work Queues:

python new_task.py "A very hard task which takes two seconds.."
python worker.py

Tutorial three: Publish/Subscribe:

python receive_logs.py
python emit_log.py "info: This is the log message"

Tutorial four: Routing:

python receive_logs_direct.py info
python emit_log_direct.py info "The message"

Tutorial five: Topics:

python receive_logs_topic.py "*.rabbit"
python emit_log_topic.py red.rabbit Hello

Tutorial six: RPC:

python rpc_server.py
python rpc_client.py