You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-4Lines changed: 42 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -32,22 +32,60 @@ Then open a browser and navigate to http://localhost:9000. The port can be overr
32
32
33
33
## Running with Docker
34
34
35
-
The following maven command will generate a Docker image:
35
+
Note for Mac Users: You need to convert newline formatting of the kafdrop.sh file *before* running this command:
36
36
37
37
```
38
-
mvn clean package assembly:single docker:build
38
+
dos2unix src/main/docker/*
39
39
```
40
40
41
-
Note for Mac Users: You need to convert newline formatting of the kafdrop.sh file *before* running this command:
41
+
The following maven command will generate a Docker image:
42
42
43
43
```
44
-
dos2unix src/main/docker/*
44
+
mvn clean package assembly:single docker:build
45
45
```
46
46
47
+
47
48
Once the build finishes you can launch the image as follows:
48
49
49
50
```
50
51
docker run -d -p 9000:9000 -e ZOOKEEPER_CONNECT=<host:port,host:port> kafdrop
51
52
```
52
53
53
54
And access the UI at http://localhost:9000.
55
+
56
+
## Kafka APIs
57
+
58
+
Starting with version 2.0.0, Kafdrop offers a set of Kafka APIs that mirror the existing HTML views. Any existing endpoint can be returned as JSON by simply setting the *Accept : application/json header*. There are also two endpoints that are JSON only:
59
+
60
+
/topic : Returns array of all topic names
61
+
/topic/{topicName}/{consumerId} : Return partition offset and lag details for a specific topic and consumer.
62
+
63
+
## Swagger
64
+
65
+
To help document the Kafka APIs, Swagger has been included. The Swagger output is available by default at the following Kafdrop URL:
66
+
67
+
/v2/api-docs
68
+
69
+
However this can be overridden with the following configuration:
0 commit comments