Giter Club home page Giter Club logo

rabbitmq-example's Introduction

RABBITMQ - SYSTEM MENSSAGING

Example of using messages to communicate between systems based on microservices using queues.

Prerequisites

  • Docker Compose version (1.25.4)
  • Docker version (19.03.8)
  • Node version (12.16.1)
  • Npm version (6.14.4)

Getting Started

  1. Fork this repository and clone on your machine
  2. Change the directory to rabbitmq-nodejs-messaging-example where you cloned it;
  3. At the terminal, run:
/* Install dependencies from consumer */

$ cd consumer

$ npm install

/* Install dependencies from producer */

$ cd producer

$ npm install
  1. Run docker. In the directory rabbitmq-nodejs-messaging-example execute.
/* Up docker */

$ docker-compose up -d

/* Down docker */

$ docker-compose down
  1. Open robbitMQ: the host localhost:15672 and start using it. Credentials user: rabbitmq password: rabbitmq

  2. Execute project on consumer & producer.

/* execute on directory consumer */

$ npm run start

/* execute on directory producer */

$ npm run start

How it works ?

  • Producer

    • The guy who will send the message, data.
  • Exchange

    • Responsible for receiving these messages, and deciding which queue this message will be sent to. Remembering when you work with applications, you don't work with just one queue, you can have queues of everything that is different and types, and several exchanges.
  • Queue

    • The queue stores messages and dispatches them.
  • Consumer

    • The consumer has a process that listens to everything that arrives in the queue. In this case, he removes the messages from the queue, and gives a ACK: acknowledge.

rabbitmq-example's People

Contributors

nelsonwenner avatar

Stargazers

 avatar

Watchers

 avatar  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.