All Projects → gnuhpc → Kafka Zk Restapi

gnuhpc / Kafka Zk Restapi

Kafka Zookeeper RESTful API to perform topic/consumer group administration/metric(offset\lag\message) collection and monitor

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Kafka Zk Restapi

Devicehive Java Server
DeviceHive Java Server
Stars: ✭ 241 (+99.17%)
Mutual labels:  rest, zookeeper, kafka
Kafdrop
Kafka Web UI
Stars: ✭ 3,158 (+2509.92%)
Mutual labels:  zookeeper, kafka, topic
Zerocode
A community-developed, free, open source, microservices API automation and load testing framework built using JUnit core runners for Http REST, SOAP, Security, Database, Kafka and much more. Zerocode Open Source enables you to create, change, orchestrate and maintain your automated test cases declaratively with absolute ease.
Stars: ✭ 482 (+298.35%)
Mutual labels:  rest, consumer, kafka
Digital Restaurant
DDD. Event sourcing. CQRS. REST. Modular. Microservices. Kotlin. Spring. Axon platform. Apache Kafka. RabbitMQ
Stars: ✭ 222 (+83.47%)
Mutual labels:  rest, restful-api, kafka
Anotherkafkamonitor Akm
Another app which used to monitor the progress of Kafka Producer and Consumer
Stars: ✭ 36 (-70.25%)
Mutual labels:  zookeeper, consumer, kafka
Burrowui
This is a NodeJS/Angular 2 frontend UI for Kafka cluster monitoring with Burrow
Stars: ✭ 69 (-42.98%)
Mutual labels:  zookeeper, kafka
Restfm
RESTful web services for FileMaker server.
Stars: ✭ 76 (-37.19%)
Mutual labels:  rest, restful-api
Evolutility Server Node
Model-driven REST or GraphQL backend for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
Stars: ✭ 84 (-30.58%)
Mutual labels:  rest, restful-api
Kafka Visualizer
A web client for visualizing your Apache Kafka topics live.
Stars: ✭ 98 (-19.01%)
Mutual labels:  kafka, topic
Commonx
基础框架
Stars: ✭ 57 (-52.89%)
Mutual labels:  zookeeper, kafka
Repository
个人学习知识库涉及到数据仓库建模、实时计算、大数据、Java、算法等。
Stars: ✭ 92 (-23.97%)
Mutual labels:  zookeeper, kafka
Bigdata Notes
大数据入门指南 ⭐
Stars: ✭ 10,991 (+8983.47%)
Mutual labels:  zookeeper, kafka
Ansible Playbook
Ansible playbook to deploy distributed technologies
Stars: ✭ 61 (-49.59%)
Mutual labels:  zookeeper, kafka
Gorsk
🔥 Idiomatic Golang Restful Starter Kit
Stars: ✭ 1,108 (+815.7%)
Mutual labels:  rest, restful-api
Kafkawize
Kafkawize : A Self service Apache Kafka Topic Management tool/portal. A Web application which automates the process of creating and browsing Kafka topics, acls, schemas by introducing roles/authorizations to users of various teams of an org.
Stars: ✭ 79 (-34.71%)
Mutual labels:  kafka, topic
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+8688.43%)
Mutual labels:  rest, restful-api
Appy Backend
A user system to bootstrap your app.
Stars: ✭ 96 (-20.66%)
Mutual labels:  rest, restful-api
Kafka Stack Docker Compose
docker compose files to create a fully working kafka stack
Stars: ✭ 1,836 (+1417.36%)
Mutual labels:  zookeeper, kafka
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (+1047.93%)
Mutual labels:  zookeeper, kafka
Kafka Flow
KafkaFlow is a .NET framework to consume and produce Kafka messages with multi-threading support. It's very simple to use and very extendable. You just need to install, configure, start/stop the bus with your app and create a middleware/handler to process the messages.
Stars: ✭ 118 (-2.48%)
Mutual labels:  consumer, kafka

= Kafka REST API

image:https://travis-ci.org/gnuhpc/Kafka-zk-restapi.svg?branch=master["Build Status", link="https://travis-ci.org/gnuhpc/Kafka-zk-restapi"]

[[_overview]] == Overview Kafka/ZK REST API is to provide the production-ready endpoints to perform some administration/metric task for Kafka and Zookeeper.

// tag::base-t[] .Following features are provided:

  • cluster/nodes/controller info describe
  • Broker List
  • Broker config get/update, dynamic config get/update/delete
  • Log dirs describe, filtered by brokers/topic/partition/logdirs
  • Topic create/delete/describe/list
  • Topic config create/update/list
  • Topic partition add and reassign, replicas movement between log directories is supported
  • Topic Partition leadership transfer back to preferred replica
  • Consumer group list/describe/delete
  • Consumer Group Lag check
  • Offset reset by earliest/latest/timestamp
  • Contents view of message by different decoder, avro is also supported
  • Schema management on Schema Registry is supported
  • Collect JMX metrics from brokers that expose JMX metrics + More details refer to https://github.com/gnuhpc/Kafka-zk-restapi/blob/master/docs/JMXCollector.adoc[JMXCollector API Specification]
  • Secure the REST API with Spring Security // end::base-t[]

image::https://raw.githubusercontent.com/gnuhpc/Kafka-zk-restapi/master/pics/ShowApi.png[API]

We have also opensourced a simple but useful UI for these APIs. Please check https://github.com/gnuhpc/Kafka-zk-restapi-UI for more details.

=== Installation and run First of all, Java 8 jre/jdk needed.

You can download the release package at https://github.com/gnuhpc/Kafka-zk-restapi/releases

You can get it running by unzip/untaring the distribution package, perform some configurations needed and run bin/start.sh

=== How to build

You can build this restapi server using maven.

. $ git clone \https://github.com/gnuhpc/Kafka-zk-restapi.git . $ cd Kafka-zk-restapi/ . $ mvn clean package -Dmaven.test.skip=true

After maven building, you will find zip/tar under directory: Kafka-zk-restapi/target.

New: Now we support build docker image using spotify docker-maven-plugin. A docker image named kafka-rest-springboot:latest is created after building. If you want to build your own image, modify application property files in src/main/resources first. Details refer to <<_How to config,'How to config'>>

=== How to config You can get it running by unzip/untaring the distribution package and change the corresponding configuration in config directory:

Change the following settings of application-ACTIVEENV.yml:

  • kafka.brokers: kafka broker addresses.
  • kafka.schemaregistry: Schema Registry address. If not exist, just provide a random URL.
  • kafka.healthcheck.topic: Topic name for health check.
  • kafka.sasl.enable/kafka.sasl.protocol/kafka.sasl.mechanism: Set kafka.sasl.enable to true if connect to a kafka cluster that adds SASL authentication. Remember to assign JAAS config file location to JVM property java.security.auth.login.config before starting this application.
  • zookeeper.uris: zookeeper addresses.
  • jmx.kafka.jmxurl/jmx.zookeeper.jmxurl: kafka/zookeeper jmx urls. If you want to use JMX Query Filter function, you can add your own custom filter files to JMXFilterTemplate directory in project root folder. More details refer to https://github.com/gnuhpc/Kafka-zk-restapi/blob/master/docs/JMXCollector.adoc[JMXCollector API Specification]
  • server.security.check/server.security.checkInitDelay/server.security.checkSecurityInterval: Security related parameters. See below: <<_security,'How to config security'>>

=== How to run ==== A. Pulling from Docker hub Step 1 : Prepare a directory that contains spring application property files as a volume to mount into the container. Custom your own parameters such as Kafka/zk addresses, schema registry url, security params, etc.

Step 2 : Run the image. /XX/XX/config is the directory that noticed in Step 1.

$ docker run -p 8121:8121 -v /XX/XX/config:/app/config --env JAVA_OPTS='-Xms1g -Xmx1g' tinawenqiao/kafka-rest-springboot

Details refer to https://hub.docker.com/r/tinawenqiao/kafka-rest-springboot

Note: Make sure advertised.listeners(kafka server property) is set correctly if you access kafka from docker image.

==== B. Run your own docker image

$ docker run -p 8121:8121 --env JAVA_OPTS='-Xms1g -Xmx1g' tinawenqiao/kafka-rest-springboot:latest

Note: Make sure advertised.listeners(kafka server property) is set correctly if you access kafka from docker image.

See <<_How to build,'How to build'>>

==== C. Use the built tar/zip package . $ tar -xvf kafka-zk-api-1.1.x-release-dist.tar or $ unzip kafka-zk-api-1.1.x-release-dist.zip . $ cd kafka-zk-api-1.1.x-release-dist . $ bin/start.sh

Note: If connect to a kafka cluster that adds SASL authentication, add -Djava.security.auth.login.config=jaas.conf to JVM property.

[[_security]] === Security Public REST services without access control make the sensitive data under risk.Then we provide a simple authentication mechanism using Spring Security. In order to make the project lighter, we use yml file to store user information, not using database.

Follow the steps to enable security feature:

Step 1:Modify the application config file and set server.security.check to true. +

  • server.security.check: ** True: Add security for the API. Clients can access the API with valid username and password stored in security.yml, or the Swagger UI(http://127.0.0.1:8121/api) is only allowed to access. ** False: All the endpoints can be accessed without authentication.
  • server.security.checkInitDelay: The number of seconds of init delay for the timing thread to check the security file.
  • server.security.checkSecurityInterval: The number of seconds of check interval for the timing thread to check the security file.

Step 2: Make sure security/security.yml exist in application root folder.

Step 3: Use user controller API to add user to security file security/security.yml. + Notice:

  • The first user should be added manually. Password need to be encoded using bcrypt before saving to the yml file.For convenience, we provide CommonUtils to encode the password.
  • No need to restart server after adding new user or update user info. Timing thread introduced in Step 1 will refresh the user list according to your settings.

=== Support Kafka Version Information Currently, this rest api (master branch) supports Kafka 1.1.1 brokers. The master branch is the most active branch.

For other version of kafka rather than 1.1.1, please checkout the coresponding branch by calling the command:

git clone -b BRANCHNAME https://github.com/gnuhpc/Kafka-zk-restapi.git

=== URI scheme [%hardbreaks] Host : localhost:8121 BasePath : /

You can access Swagger-UI by accessing http://127.0.0.1:8121/api

=== https://github.com/gnuhpc/Kafka-zk-restapi/blob/master/docs/paths.adoc[API LIST for 1.1.1]

  • kafka-controller : Kafka Api
  • zookeeper-controller : Zookeeper Api
  • collector-controller : JMX Metric Collector Api
  • user-controller : User management Api

=== https://github.com/gnuhpc/Kafka-zk-restapi/blob/master/docs/definitions.adoc[Data Model Definitions for 1.1.1]

=== Version information [%hardbreaks] Version : 1.1.1

=== Contact information [%hardbreaks] Contact : gnuhpc Contact Email : [email protected] Github : https://github.com/gnuhpc Github : https://github.com/tinawenqiao

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].