KhitrovMaksim / nestjs-rabbitmq

NodeJS, RabbitMQ, NestJS, TypeScript, Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM Version Package License

Description

The mechanism for asynchronous processing of HTTP requests.

Requirements:

  1. It is required to develop a mechanism for asynchronous processing of HTTP requests
  2. Required stack: NodeJS, RabbitMQ
  3. Required as a repository on GitHub
  4. Need to attach instructions for local deployment of the project
  5. Required to implement logging for debugging and monitoring purposes
  6. It is required to develop an M1 microservice for processing incoming HTTP requests
  7. It is required to develop an M2 microservice for processing jobs from RabbitMQ

Algorithm:

  • We receive an HTTP request at the M1 microservice level.
  • We broadcast the HTTP request to the RabbitMQ queue. The request is transformed into a task.
  • We process the task with the M2 microservice from the RabbitMQ queue.
  • We place the result of processing the job in RabbitMQ.
  • We return the result of the HTTP request as the result of the job from RabbitMQ.

Scheme

scheme.png

Local deployment

$ git clone https://github.com/KhitrovMaksim/nestjs-rabbitmq.git
$ cd nestjs-rabbitmq
$ docker-compose up --build -V

Stay in touch

About

NodeJS, RabbitMQ, NestJS, TypeScript, Docker


Languages

Language:TypeScript 81.9%Language:Dockerfile 9.3%Language:JavaScript 8.0%Language:Shell 0.8%