Skip to content

Commit 1ac238e

Browse files
committed
BE: Quick fix on messages count calculation
1 parent 19cdfcc commit 1ac238e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/src/main/java/io/kafbat/ui/model/InternalTopic.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ public static InternalTopic from(TopicDescription topicDescription,
148148
result = 0L;
149149
if (partitions != null && !partitions.isEmpty()) {
150150
for (InternalPartition partition : partitions.values()) {
151-
result += (partition.getOffsetMax() - partition.getOffsetMin());
151+
if (partition.getOffsetMin() != null && partition.getOffsetMax() != null) {
152+
result += (partition.getOffsetMax() - partition.getOffsetMin());
153+
}
152154
}
153155
}
154156
}

0 commit comments

Comments
 (0)