Coder Social home page Coder Social logo

khalilannbiya / basic-rabbitmq Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4 KB

Learning the Basics of RabbitMQ as a Message Broker | Practice case studies in the Belajar Fundamental Aplikasi Backend class at Dicoding

JavaScript 100.00%
message-broker nodejs rabbitmq

basic-rabbitmq's Introduction

Learning the Basics of RabbitMQ as a Message Broker

The purpose of this project is to understand the use of a message broker, and this time we are using RabbitMQ as the message broker. Remember, RabbitMQ is a message broker that is responsible for receiving and delivering messages. You can think of a message broker as a postal worker who can receive messages from senders and deliver them to recipients. The difference between RabbitMQ and a typical postal worker is that RabbitMQ doesn't accept paper as messages; instead, it receives data collections in the form of buffers known as messages. Here are some terms you need to understand when building a message broker using RabbitMQ: Producing: The activity of sending messages. The party or program sending messages is called a producer. Queue: A mailbox located on the RabbitMQ server that can hold many messages. Despite its capacity for many messages, a queue still has limits, especially when messages contain large buffers. Consuming: The activity of receiving messages. The party or program receiving messages is called a consumer. Consumers continuously monitor the queues on the RabbitMQ server while they are available or capable of receiving messages.

Tech Stack

  • Server : Nodejs, RabbitMQ

Run Locally

Clone the project

  git clone https://github.com/khalilannbiya/basic-rabbitmq.git

Or Download ZIP

Link

Go to the project directory

  cd basic-rabbitmq

Make sure you have RabbitMQ installed locally. If you haven't already, you can install it from Download RabbitMQ. Choose the version that matches your operating system. In my case, I installed it using the Windows Installer.

If you haven't installed Erlang on your computer, you'll receive a warning. Please install Erlang from here: Download Erlang and make sure it matches the RabbitMQ version here: Make sure.

Try installing RabbitMQ again after successfully installing Erlang.

The installation process is complete! To ensure that the RabbitMQ server is running on your computer, you can check it through the RabbitMQ management page. However, to access it, we need to enable the rabbitmq_management plugin. To do this, in the Windows search, look for "RabbitMQ Command" and then enter the following command:

  rabbitmq-plugins.bat enable rabbitmq_management

Please visit the address http://localhost:15672 and enter the username and password with the value "guest".

Move to the "Queues" tab. On this queues page, you will see a list of active messages as well as those that have been sent to consumers.

Install node_modules

  pnpm i

To send a message, run

  node producer.js

To consume or receive messages sent by the producer, run the command

  node consumer.js

Documentation

Feedback

If you have any feedback, please reach out to us at [email protected]

basic-rabbitmq's People

Contributors

khalilannbiya avatar

Watchers

 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.