https://github.com/robertoachar/python-rabbitmq
A playground for Python and RabbitMQ.
https://github.com/robertoachar/python-rabbitmq
microservices python python-3 rabbit-mq
Last synced: about 1 year ago
JSON representation
A playground for Python and RabbitMQ.
- Host: GitHub
- URL: https://github.com/robertoachar/python-rabbitmq
- Owner: robertoachar
- Created: 2017-09-18T16:51:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-18T19:43:26.000Z (over 8 years ago)
- Last Synced: 2025-02-17T10:21:39.847Z (over 1 year ago)
- Topics: microservices, python, python-3, rabbit-mq
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python with RabbitMQ
[![License][license-badge]][license-url]
> A playground for Python and RabbitMQ.
# Installation
## Windows Installation
* Install Erlang : [otp_win64_20.0.exe](http://erlang.org/download/otp_win64_20.0.exe)
* Install RabbitMQ: [rabbitmq-server-3.6.12.exe](https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_12/rabbitmq-server-3.6.12.exe)
* Install Python3: [python-3.5.2-amd64.exe](https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe)
* Install `pika`
```bash
$ pip install pika==0.11.0
```
## Enable RabbitMQ Management Plugin (optional)
```bash
$ cd C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.12\sbin
$ rabbitmq-plugins enable rabbitmq_management
```
Browser to: [http://localhost:15672](http://localhost:15672)
* Username: guest
* Password: guest
# Development
* Cloning the repo
```bash
$ git clone https://github.com/robertoachar/python-rabbitmq.git
```
# Usage
* Hello World
```bash
# producer
$ python hello-world/producer.py
# consumer
$ python hello-world/consumer.py
```
* Work Queues
```bash
# task
$ python work-queues/task.py
# worker
$ python work-queues/worker.py
```
# Troubleshooting
## Installing as a non-administrator user leaves .erlang.cookie in the wrong place
This makes it impossible to use `rabbitmqctl`.
Workarounds:
* Run the installer as an administrator _or_;
* Copy the file `.erlang.cookie` manually from `%SystemRoot%` to `%HOMEDRIVE%%HOMEPATH%`.
* Restart service (stop and start)
# Author
[Roberto Achar](https://twitter.com/robertoachar)
# License
[MIT](https://github.com/robertoachar/node-rabbitmq/blob/master/LICENSE)
[license-badge]: https://img.shields.io/github/license/robertoachar/node-rabbitmq.svg
[license-url]: https://opensource.org/licenses/MIT