Hello there Tri0L! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀 Hi, thanks for the suggestion! We'll take this into consideration :) Related: #1383 @Tri0L thank you for suggestion. Unfortunately Number of message sorting is not likely to be done, since to calculate number of messages we need to do several heavy API calls. Currently we do it after sorting applied. 
As for size - it is doable, since this data is cached (updated every 30 sec by default). @ValentinPrischepa please take it to account ^
Sort topics by size
### Is your proposal related to a problem?

Sometimes I need to find biggest topic in cluster. It will be great if I can sort list topics by `Size`/`Number of messages` in UI by click on table header like this is working for `Total partitions` or `Out of sync replicas`




kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/TopicsService.java kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/TopicsService.java kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/TopicsService.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/TopicsService.java
index d115f99c318..5a14e8c9aff 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/TopicsService.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/TopicsService.java
@@ -455,6 +455,8 @@ private Comparator<InternalTopic> getComparatorForTopic(
           return Comparator.comparing(t -> t.getReplicas() - t.getInSyncReplicas());
         case REPLICATION_FACTOR:
           return Comparator.comparing(InternalTopic::getReplicationFactor);
+        case SIZE:
+          return Comparator.comparing(InternalTopic::getSegmentSize);
         case NAME:
         default:
           return defaultComparator;
diff --git a/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml b/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
index 6fd9c4efa64..ae5e4c85c1d 100644
--- a/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
+++ b/kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml
@@ -1738,6 +1738,7 @@ components:
         - OUT_OF_SYNC_REPLICAS
         - TOTAL_PARTITIONS
         - REPLICATION_FACTOR
+        - SIZE
 
     SortOrder:
       type: string
