这是indexloc提供的服务,不要输入任何密码
Skip to content

ahmedshaaban/Tornado-Rabbitmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tornado-Rabbitmq

  • consume messages (content type "application/json") from RabbitMQ and store them in MongoDB
  • provide websocket endpoint that publishes incoming messages to websocket clients as they arrive from RabbitMQ
  • the routing key format is {collection}.{_id} denoting MongoDB collection and document _id eg. a message with routing key foo.bar should be inserted in collection "foo" with document _id "bar"

to run app:

  1. The setting assumes that there is no mongodb or rabbitmq installed on the machine, if no please stop both of the services
  2. open a new terminal and run docker-compose build && docker-compose up
  3. Client side can be reached through Here
  4. To send msg please do as follow:
    1. open a new terminal in the same directory and run virtualenv --distribute --no-site-packages ./venv
    2. run source ./venv/bin/activate
    3. run pip install -r requirements.pip
    4. run python send.py (please not if you Interrupt the python send.py command the rabbitmq client session get closed according to the test file you sent earlier it deleted the exchange)
    5. check the client side

to connect to the db:

  1. open a new terminal and run mongo
  2. run use task_db
  3. run show collections

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published