A Kafka get started typescript app with producer ( as server ) and consumer
- Clone a repo
- Start kafka from dockcer image by
docker compose up
- Create a Topic by making a GET Request
createTopic
, it'll create a topic with nametopic-a
- Verify topic creation by making a GET request
listTopics
. - Produce message by making POST request to
/produce
, params:
{
"topicName": "topic-a",
"messages": ["Hello World"]
}
- Run Consumer app and you can find logs of producers once consumer connected successfully