Skip to content

Enterprise Integration Patterns Demos using RabittMQ and Python/Kombu

Notifications You must be signed in to change notification settings

kevinwkc/eip-presentation-demos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Enterprise Integration Patterns Demo - Introduction to Messaging Patterns

##Requirements

  1. python 2.7+
  2. Install pip: sudo easy_install pip
  3. Install virtualenv: pip install virtualenv
  4. Install virtualenvwrapper: pip install virtualenvwrapper
  5. Install Rabbit MQ Server Mac Distro

##Get environment Set-up

  1. Create Your Virtual Environment
$ mkvirtualenv eip_demo

  1. Activate virtual environment
$ workon eip_demo

  1. Install requirements
$ cd eip_demp

``` $ pip install -r requirements.txt ```
  1. Start rabbitmq in a new window
$ rabbitmq-server

##A few commands

  1. Access RabitMQ Admin UI:
  2. Shutdown RabbitMQ Server: Ctrl+C in server window then k
  3. Exit Virtual env deactivate eip_demo

##The Examples

  1. Simple Send/Receive

Send/Receive

Producer sends messages to the "hello" queue. The consumer receives messages from that queue.

  1. Work Queue

Send/Receive

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.

  1. Publish-Subscribe

Send/Receive

Deliver a message to multiple consumers registered on a particular channel. This pattern is known as "publish/subscribe".

  1. Content Based Routing

Send/Receive

Route messages to the appropriate Message Queue based on message identifier (routing key).

  1. Topic Based Exchanges/Queues

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.

##Running Examples See notes and comments in respective client/server files.

##Additional Reference Materials

###RabbitMQ Documentation ###Kombu ###AMQP Reference ###EIP Book ###EIP Refrence ###More Tutorials/Examples ####RabbitMQ ####Kombu

About

Enterprise Integration Patterns Demos using RabittMQ and Python/Kombu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%