Pil0tXia commented on code in PR #4395:
URL: https://github.com/apache/eventmesh/pull/4395#discussion_r1305842807


##########
eventmesh-storage-plugin/eventmesh-storage-rabbitmq/src/main/java/org/apache/eventmesh/storage/rabbitmq/admin/RabbitMQAdmin.java:
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.storage.rabbitmq.admin;
+
+import org.apache.eventmesh.api.admin.AbstractAdmin;
+import org.apache.eventmesh.api.admin.TopicProperties;
+import org.apache.eventmesh.storage.rabbitmq.config.ConfigurationHolder;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import io.cloudevents.CloudEvent;
+
+public class RabbitMQAdmin extends AbstractAdmin {
+
+    private ConfigurationHolder configurationHolder;
+
+    private String mgmtHost;
+
+    private int mgmtPort;
+
+    private String mgmtProtocol;
+
+    public RabbitMQAdmin() {
+        super(new AtomicBoolean(false));
+    }
+
+    public void init() throws Exception {
+        this.mgmtHost = configurationHolder.getHost();
+        this.mgmtPort = configurationHolder.getMgmtPort();
+        this.mgmtProtocol = configurationHolder.getMgmtProtocol();
+    }
+
+    @Override
+    public List<TopicProperties> getTopic() {
+        // Utilizing the RabbitMQ Management HTTP API is a favorable approach 
to list queues and historical message counts.
+        // To display topics, it would be necessary to retrieve the topic name 
from each message and use it to declare a corresponding queue.
+        return new ArrayList<>();

Review Comment:
   It is an instruction for future development, indicating that using RabbitMQ 
HTTP API provided by rabbitmq_management webui is the best way to implement 
this admin function.
   
   The reason that why I didn't implement this is because that the admin 
function is limited by storage-plugin and the original author is currently 
unreachable. I will come back after other storage-plugins' admin functions are 
done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to