- git clone
- go to root folder
- sbt
- clean
- compile
- test
- docker
- exit from sbt
- docker-compose up
# log. The consumer group is called "my_json_consumer" and the instance is "my_consumer_instance".
$ curl -X POST -H "Content-Type: application/vnd.kafka.v1+json" -H "Accept: application/vnd.kafka.v1+json" \
--data '{"name": "my_consumer_instance", "format": "json", "auto.offset.reset": "latest"}' \
http://localhost:8082/consumers/my_json_consumer
# Subscribe the consumer to a topic
$ curl -X POST -H "Content-Type: application/vnd.kafka.v1+json" --data '{"topics":["filtertopic"]}' \
http://localhost:8082/consumers/my_json_consumer/instances/my_consumer_instance/subscription
# Then consume some data from a topic using the base URL in the first response.
$ curl -X GET -H "Accept: application/vnd.kafka.json.v1+json" \
http://localhost:8082/consumers/my_json_consumer/instances/my_consumer_instance/records
docker ps | grep cp-kafka (get container id) docker exec -ti containerId bash kafka-console-consumer --zookeeper zookeeper:2181 --topic filtertopic --from-beginning