Skip to content

Repository files navigation

WebSocket server with Kafka

This is a WebSocket server that can interact with different microservices in an existing platform. The idea of the WebSocket server is to receive messages from various microservices and publish them through the WebSocket channel. The various microservices and WebSocket server communication is implemented with Apache Kafka. There is one topic where different microservices can produce messages that are later sent through the WebSocket channel. There is a public WebSocket API where clients can subscribe and receive WebSocket notifications. alt text

Prerequisites

You should have Kafka installed on your machine. For your comfort a docker-compose.yaml file is provided, which you can run by

$ docker-compose up -d

Initialization

Clone the repository. Install the necessary modules via command

$ npm i

Copy .env.example to a .env file. Then run the project via

$ npm start

Testing

An end-to-end test is implemented. To run it, make sure the app is running, then in a separate terminal window run

$ npm test

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages