Skip to content

Commit 5cc5d1a

Browse files
authored
Merge pull request #36 from tzachshabtay/sorted_partitions
Sort the topic partitions before returning
2 parents e0a7fb8 + 87701a1 commit 5cc5d1a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/server/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ app.get("/api/topics", async (req, res) => {
7575
app.get("/api/topic/:topic", async (req, res) => {
7676
try {
7777
const offsets = await withRetry("fetchTopicOffsets", () => kafka.Admin.fetchTopicOffsets(req.params.topic))
78+
offsets.sort((o1, o2) => o1.partition - o2.partition)
7879
try {
7980
const config = await getTopicConfig(req.params.topic)
8081
res.status(200).json({offsets, config})

0 commit comments

Comments
 (0)