loopbackio / loopback4-example-kafka

A LoopBack 4 example application for Kafka integration
MIT License
11 stars 4 forks source link

loopback4-example-kafka

A LoopBack 4 example application for Kafka integration.

See related issues:

Getting started

Start a Kafka instance

docker-compose up

Start the application

npm start

Now you can try out on http://localhost:3000/explorer.

To use curl:

curl -X POST "http://127.0.0.1:3000/topics" -H "accept: */*" -H "Content-Type: application/json" -d "[\"demo\"]"
curl -X POST "http://127.0.0.1:3000/topics/demo/messages" -H "accept: */*" -H "Content-Type: application/json" -d "[\"test messsage\"]"
curl -X GET "http://127.0.0.1:3000/topics/demo/messages?limit=3" -H "accept: */*"

LoopBack