Code Monkey home page Code Monkey logo

kafka-admin-boot's Introduction

Build

make build

Build docker image

make build-docker

Run Kafka

Simplest way how to execute the kafka admin is to run the static network configuration. Located in ./kafka/docker/static . Here is a docker compose file which assignes static IP address to each server: kafka, zookeeper, kafka-admin-boot.

Kafka Admin

Simple REST based Kafka administration tool. It is not intended for production use at the moment.

Environment variable KAFKA_BOOTSTRAP defines the URL of Kafka cluster. Pass it to docker run or docker-compose command.

Verb Endpoint Usage
GET /topics curl -v http://localhost:8080/topics
GET /topics/describe curl -v http://localhost:8080/topics/describe
GET /topic/describe/{name} curl -v http://localhost:8080/topic/describe/my-topic
POST /topic/{name} curl -v -X POST http://localhost:8080/topic/my-topic
POST /topic/{name}/partition/{count} curl -v -X POST http://localhost:8080/topic/my-topic/partition/2
DELETE /topic/{name} curl -v -X DELETE http://localhost:8080/topic/my-topic
DELETE /topic/{name}/deleterecords/{partition} curl -v -X DELETE http://localhost:8080/topic/my-topic/deleterecords/1

Get Topics

GET /topics returns plain list of topic names

[
    "another-topic",
    "my-topic"
]

Describer topics

GET /topics/describe

Returns extended list of topics.

[
    {
        "name": "my-topic",
        "partitions": [
            {
                "partition": 0,
                "leader": "172.19.0.3:9092 (id: 1001 rack: null)"
            }
        ]
    },
    {
        "name": "another-topic",
        "partitions": [
            {
                "partition": 0,
                "leader": "172.19.0.3:9092 (id: 1001 rack: null)"
            }
        ]
    }
]

Describe single topic

GET /topic/describe/my-topic

{
    "name": "my-topic",
    "partitions": [
        {
            "partition": 0,
            "leader": "172.19.0.3:9092 (id: 1001 rack: null)"
        }
    ]
}

Create topic

POST /topic/{topic-name}

Where {topic-name} is the required topic name. Returns 202 Accepted in case of success.

Create partition

POST /topic/my-topic/partition/2

Increase total partition count by n

kafka-admin-boot's People

Contributors

davidul avatar

Watchers

James Cloos avatar  avatar

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.