Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 738 Bytes

README.md

File metadata and controls

37 lines (33 loc) · 738 Bytes

kafka-project

clone the project and run:

docker-compose up -d

and

npm install

In one terminal, run:

node consumer.js

You will have something like this:

Sent message 1
Sent message 2
…
Sent message 100

In other terminal, run:

node producer.js

You will have something like this:

{ value: 'Message 1 sent by a Kafka Producer!' }
{ value: 'Message 2 sent by a Kafka Producer!' }
…
{ value: 'Message 100 sent by a Kafka Producer!' }

That means that everything is going as expected. The producer is producing the messages and the consumer is consuming the messages.

You can also track this through the Kafka UI on localhost:8081.