Giter Club home page Giter Club logo

rabbit_mq_h's Introduction

Overview

Main target is to manage tools which helps user to edit strings. Service replacing chars in text(published into it by JSON message) with defined function in performer.py.

Message must strictly adopted to JSON template:

{
   'NAME':'message'
}

Where 'NAME' is static keyword required for micro-service(hereinafter "MS") and 'message' - any string text defined by user.

As output we got updated JSON with 'H' to 'M' first appeared letter replaced in 'message' which sends towards to next MS queue.

Requirements

  • pika==0.11.2 (because we need sometimes to feed our python with small rodents)

Pika has used for supplying pure-Python implementation of the AMQP 0-9-1 protocol including RabbitMQ’s extensions. That module gives us ability to perform any manipulations with RabbitMQ.

Run

All commands will be perform in terminal (docker must be installed).

First of all you need to raise up RabbitMQ server with command:

docker run -d --hostname my-rabbit -p 0.0.0.0:5672:5672 -p 0.0.0.0:15672:15672  --name some-rabbit -e RABBITMQ_DEFAULT_USER=user_name -e RABBITMQ_DEFAULT_PASS=user_password rabbitmq:3-management

Ports ASMP:5672 and HTTP:15672 are defaults for backend(functional) and frontend(web) accordingly. 0.0.0.0 means that RabbitMQ will listen for all hosts.

If you want to run single MS just run build.sh placed in primary folder titled with MS name.

Configuration

File config.py maintain configurations for MS:

SET = {
    'port':'5672', #default port
    'server':'0.0.0.0', #rabbit-mq server ip adres
    'name':'user_name', #name required for connection to server
    'passwd':'user_password', #password required for connection to server
    'queue_current':'RMQ-H-E', #name of the current queue, where initial JSON being preserved
    'queue_above':'RMQ-E-L' #name of the next queue, where JSON sends after processing
}

Everything above(excluding queue set and server ip) must be exactly the same as defined in command raising RabbitMQ server.

rabbit_mq_h's People

Contributors

vainia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.