Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nish1013/kafka-client
Kafka Client is a Node.js application written in TypeScript that demonstrates how to use Apache Kafka while adhering to SOLID principles.
https://github.com/nish1013/kafka-client
Last synced: about 2 months ago
JSON representation
Kafka Client is a Node.js application written in TypeScript that demonstrates how to use Apache Kafka while adhering to SOLID principles.
- Host: GitHub
- URL: https://github.com/nish1013/kafka-client
- Owner: nish1013
- License: mit
- Created: 2023-07-24T06:56:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-24T07:07:54.000Z (over 1 year ago)
- Last Synced: 2023-07-24T08:27:53.168Z (over 1 year ago)
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kafka Client - Node.js TypeScript App
**Kafka Client** is a Node.js application written in TypeScript that demonstrates how to use Apache Kafka while adhering to SOLID principles.
## Getting Started
Follow these instructions to set up and run the Kafka Client Node.js TypeScript app.
### Prerequisites
To run this application, you need to have Apache Kafka installed and running on your machine. You can download and install Kafka from the official website: [Apache Kafka](https://kafka.apache.org/downloads).
### Installation
1. Clone the repository:
```bash
git clone
```2. Navigate to the project directory:
```bash
cd kafka-client
```3. Install the dependencies:
```bash
npm install
```### Configuration
Before running the app, make sure to update the Kafka configuration in `src/kafkaConfig.ts` with your Kafka broker details:
```typescript
// src/kafkaConfig.ts
export const kafkaConfig = {
brokers :["localhost:9092"], // Replace with your Kafka broker(s) information
topic: "test-topic", // Replace with your Kafka topic name
clientId:"kafka-client" // Replace with your Kafka client ID
};
```### Running the App
To start the application, run the following command:
```bash
npm start
```This will start the Kafka producer and consumer, demonstrating the interaction between the two.
## Features
- Kafka Producer: Sends messages to a Kafka topic.
- Kafka Consumer: Receives messages from the same Kafka topic.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
This project was created for educational purposes and follows the SOLID principles to demonstrate how to use Kafka with Node.js and TypeScript. Feel free to use and modify it as needed.