Git Product home page Git Product logo

spring-boot-kafka-restful-swagger's Introduction

spring-boot-kafka-restful-swagger

A SpringBoot RESTful, SwaggerUI API documentation example for Kafka.

Kafka in docker

https://docs.confluent.io/current/installation/docker/docs/installation/single-node-client.html

Create a topic

docker exec docker-name-kafka usr/bin/kafka-topics --create --topic input --partitions input-0 
--replication-factor 1 --if-not-exists --zookeeper docker-name-zookeeper:2181

Describe created topic

docker exec docker-name-kafka usr/bin/kafka-topics --describe --topic input --zookeeper docker-name-zookeeper

Produce message to topic

docker exec  kafka kafka-console-producer --request-required-acks 1 \
--broker-list docker-name-kafka:9092 --topic input && echo 'messages.'

Consume topic's message

docker exec  docker-name-kafka usr/bin/kafka-console-consumer --bootstrap-server docker-name-kafka:9092 
--topic test --from-beginning --max-messages 42

Gitlab events example

https://raw.githubusercontent.com/yangboz/spring-boot-kafka-restful-swagger/master/src/main/resources/GitlabEvents.json

TODO

#1.Customize define Events provider, Incentive provider in Dashboard.

#2.Spring Data flow/Stream version

Demo

Docker run:

docker run -p 8096:8080 smartkit/restful-gitlab-kafka-steem:0.1

Swagger UI for RESTful APIs:

http://localhost:8096/swagger-ui.html

References

https://www.e4developer.com/2018/05/21/getting-started-with-kafka-in-spring-boot/

https://github.com/simplesteph/kafka-stack-docker-compose

https://docs.confluent.io/current/installation/docker/docs/installation/single-node-client.html

https://www.e4developer.com/2018/02/18/getting-started-with-spring-cloud-data-flow/

https://spring.io/blog/2018/04/19/kafka-streams-and-spring-cloud-stream

https://github.com/gmessner/gitlab4j-api#eventsapi

https://github.com/marvin-we/steem-java-api-wrapper

https://steemit.com/utopian-io/@dez1337/steemj-v0-4-3-is-available-now-use-the-steem-api-in-your-java-project

spring-boot-kafka-restful-swagger's People

Contributors

yangboz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

battyone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.