Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Communication via Redis buffer between two applications

Notifications You must be signed in to change notification settings

BartekCK/pub-sub-redis-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pub-sub-redis-node

The application shows the communication via the message queue between the console client application and the console subscriber in Node.js. Redis was used as a message broker between two applications.

Client application reads the entered characters from the console and sends them to the Redis buffer. The subscriber receives these messages and saves them to a file. If the client issues the "clear" command, the content of the subscribing application's file will be cleared. The application end with the "close" command. You can also close the program with the SIGINT (^ C) event

alt text

Run locally

Requirements

  • redis 6.0.9
  • Node.js >= v14.15.1
  • npm >= 7.5.4

Subscriber

cd ./subscriber
npm i
npm start:dev

Client

cd ./client
npm i
npm start:dev

Run locally with docker

docker-compose up -d

Client

cd ./client
npm i
npm start:dev

Example

alt text

Releases

No releases published

Packages

No packages published