Skip to content

Latest commit

 

History

History
20 lines (19 loc) · 762 Bytes

README.md

File metadata and controls

20 lines (19 loc) · 762 Bytes

RabbitMQ with NodeJS Example

What's this?

The purpose of this repository is to show an example about how to use RabbitMQ with NodeJS. With RabbitMQ, we can send a message through publisher and subscriber wil receive it. In the case of this example, I used the message Hello World!

How to use it

  1. Make sure you have docker or podman or another container program.
  2. Run the command to initialize the rabbitMQ service. Example with Docker:
docker compose up
  1. Install dependencies with npm, pnpm, yarn or another package manager of your choice. Example with pnpm:
pnpm i
  1. Initialize publisher and subscriber. Example:
pnpm run publisher
pnpm run subscriber
  1. Subscriber should receive Hello World as output.