=========================================================================
- python 2.7+
- Install pip:
sudo easy_install pip
- Install virtualenv:
pip install virtualenv
- Install virtualenvwrapper:
pip install virtualenvwrapper
- Install Rabbit MQ Server Mac Distro
- Create Your Virtual Environment
$ mkvirtualenv eip_demo
- Activate virtual environment
$ workon eip_demo
- Install requirements
$ cd eip_demp
``` $ pip install -r requirements.txt ```
- Start rabbitmq in a new window
$ rabbitmq-server
- Access RabitMQ Admin UI:
- Shutdown RabbitMQ Server:
Ctrl+C
in server window thenk
- Exit Virtual env
deactivate eip_demo
- Simple Send/Receive
Producer sends messages to the "hello" queue. The consumer receives messages from that queue.
- Work Queue
The main idea behind Work Queues (aka: Task Queues) is to avoid doing a resource-intensive task immediately and having to wait for it to complete. Instead we schedule the task to be done later. We encapsulate a task as a message and send it to the queue. A worker process running in the background will pop the tasks and eventually execute the job. When you run many workers the tasks will be shared between them.
- Publish-Subscribe
Deliver a message to multiple consumers registered on a particular channel. This pattern is known as "publish/subscribe".
- Content Based Routing
Route messages to the appropriate Message Queue based on message identifier (routing key).
- Topic Based Exchanges/Queues
Route messages based on complex routing key allowing for wild cards (* 1 wild card word, # 0 or more wild-card words) This pattern can have the specificity of a direct, point-to-point channel or also function like a pub-sub channel or both, depending on how queue’s are configured on the channel.
See notes and comments in respective client/server files.