loopbackio / loopback4-example-kafka

A LoopBack 4 example application for Kafka integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  • Create new topics
curl -X POST "http://127.0.0.1:3000/topics" -H "accept: */*" -H "Content-Type: application/json" -d "[\"demo\"]"
  • Publish messages to demo topic:
curl -X POST "http://127.0.0.1:3000/topics/demo/messages" -H "accept: */*" -H "Content-Type: application/json" -d "[\"test messsage\"]"
  • Receive messages from demo topic:
curl -X GET "http://127.0.0.1:3000/topics/demo/messages?limit=3" -H "accept: */*"

LoopBack

About

A LoopBack 4 example application for Kafka integration

License:MIT License


Languages

Language:TypeScript 86.7%Language:HTML 9.8%Language:JavaScript 3.5%