Admin UI: Add message queue to admin UI (#6958)

* add a menu item "Message Queue"

* add a menu item "Message Queue"
  * move the "brokers" link under it.
  * add "topics", "subscribers". Add pages for them.

* refactor

* show topic details

* admin display publisher and subscriber info

* remove publisher and subscribers from the topic row pull down

* collecting more stats from publishers and subscribers

* fix layout

* fix publisher name

* add local listeners for mq broker and agent

* render consumer group offsets

* remove subscribers from left menu

* topic with retention

* support editing topic retention

* show retention when listing topics

* create bucket

* Update s3_buckets_templ.go

* embed the static assets into the binary

fix https://github.com/seaweedfs/seaweedfs/issues/6964
This commit is contained in:
Chris Lu
2025-07-11 10:19:27 -07:00
committed by GitHub
parent a9e1f00673
commit 51543bbb87
44 changed files with 8296 additions and 1156 deletions

View File

@@ -29,6 +29,12 @@ service SeaweedMessaging {
}
rpc LookupTopicBrokers (LookupTopicBrokersRequest) returns (LookupTopicBrokersResponse) {
}
rpc GetTopicConfiguration (GetTopicConfigurationRequest) returns (GetTopicConfigurationResponse) {
}
rpc GetTopicPublishers (GetTopicPublishersRequest) returns (GetTopicPublishersResponse) {
}
rpc GetTopicSubscribers (GetTopicSubscribersRequest) returns (GetTopicSubscribersResponse) {
}
// invoked by the balancer, running on each broker
rpc AssignTopicPartitions (AssignTopicPartitionsRequest) returns (AssignTopicPartitionsResponse) {
@@ -96,14 +102,21 @@ message BalanceTopicsResponse {
}
//////////////////////////////////////////////////
message TopicRetention {
int64 retention_seconds = 1; // retention duration in seconds
bool enabled = 2; // whether retention is enabled
}
message ConfigureTopicRequest {
schema_pb.Topic topic = 1;
int32 partition_count = 2;
schema_pb.RecordType record_type = 3;
TopicRetention retention = 4;
}
message ConfigureTopicResponse {
repeated BrokerPartitionAssignment broker_partition_assignments = 2;
schema_pb.RecordType record_type = 3;
TopicRetention retention = 4;
}
message ListTopicsRequest {
}
@@ -122,6 +135,57 @@ message BrokerPartitionAssignment {
string leader_broker = 2;
string follower_broker = 3;
}
message GetTopicConfigurationRequest {
schema_pb.Topic topic = 1;
}
message GetTopicConfigurationResponse {
schema_pb.Topic topic = 1;
int32 partition_count = 2;
schema_pb.RecordType record_type = 3;
repeated BrokerPartitionAssignment broker_partition_assignments = 4;
int64 created_at_ns = 5;
int64 last_updated_ns = 6;
TopicRetention retention = 7;
}
message GetTopicPublishersRequest {
schema_pb.Topic topic = 1;
}
message GetTopicPublishersResponse {
repeated TopicPublisher publishers = 1;
}
message GetTopicSubscribersRequest {
schema_pb.Topic topic = 1;
}
message GetTopicSubscribersResponse {
repeated TopicSubscriber subscribers = 1;
}
message TopicPublisher {
string publisher_name = 1;
string client_id = 2;
schema_pb.Partition partition = 3;
int64 connect_time_ns = 4;
int64 last_seen_time_ns = 5;
string broker = 6;
bool is_active = 7;
int64 last_published_offset = 8;
int64 last_acked_offset = 9;
}
message TopicSubscriber {
string consumer_group = 1;
string consumer_id = 2;
string client_id = 3;
schema_pb.Partition partition = 4;
int64 connect_time_ns = 5;
int64 last_seen_time_ns = 6;
string broker = 7;
bool is_active = 8;
int64 current_offset = 9; // last acknowledged offset
int64 last_received_offset = 10;
}
message AssignTopicPartitionsRequest {
schema_pb.Topic topic = 1;