This is an automated email from the ASF dual-hosted git repository. lizhimins pushed a commit to branch rocketmq-studio in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git
commit 434c2ea56903b40c7536a6145da976252186c7cf Author: zhaohaihzb <[email protected]> AuthorDate: Tue Jul 28 19:28:17 2026 +0800 feat: add message trace graph model DTOs (#527) --- .../studio/model/trace/MessageTraceGraph.java | 52 +++++++++ .../studio/model/trace/MessageTraceStatusEnum.java | 35 ++++++ .../rocketmq/studio/model/trace/ProducerNode.java | 95 +++++++++++++++ .../studio/model/trace/SubscriptionNode.java | 41 +++++++ .../rocketmq/studio/model/trace/TraceNode.java | 130 +++++++++++++++++++++ 5 files changed, 353 insertions(+) diff --git a/server/src/main/java/org/apache/rocketmq/studio/model/trace/MessageTraceGraph.java b/server/src/main/java/org/apache/rocketmq/studio/model/trace/MessageTraceGraph.java new file mode 100644 index 00000000..f1a0abcb --- /dev/null +++ b/server/src/main/java/org/apache/rocketmq/studio/model/trace/MessageTraceGraph.java @@ -0,0 +1,52 @@ +/* + * 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.rocketmq.studio.model.trace; + + +import java.util.List; + +public class MessageTraceGraph { + private ProducerNode producerNode; + private List<SubscriptionNode> subscriptionNodeList; + private List<Object> messageTraceViews; + + public ProducerNode getProducerNode() { + return producerNode; + } + + public void setProducerNode(ProducerNode producerNode) { + this.producerNode = producerNode; + } + + public List<SubscriptionNode> getSubscriptionNodeList() { + return subscriptionNodeList; + } + + public void setSubscriptionNodeList(List<SubscriptionNode> subscriptionNodeList) { + this.subscriptionNodeList = subscriptionNodeList; + } + + public List<Object> getMessageTraceViews() { + return messageTraceViews; + } + + public void setMessageTraceViews(List<Object> messageTraceViews) { + this.messageTraceViews = messageTraceViews; + } + +} diff --git a/server/src/main/java/org/apache/rocketmq/studio/model/trace/MessageTraceStatusEnum.java b/server/src/main/java/org/apache/rocketmq/studio/model/trace/MessageTraceStatusEnum.java new file mode 100644 index 00000000..2827485e --- /dev/null +++ b/server/src/main/java/org/apache/rocketmq/studio/model/trace/MessageTraceStatusEnum.java @@ -0,0 +1,35 @@ +/* + * 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.rocketmq.studio.model.trace; + + +public enum MessageTraceStatusEnum { + SUCCESS("success"), + FAILED("failed"), + UNKNOWN("unknown"); + private final String status; + + MessageTraceStatusEnum(String status) { + this.status = status; + } + public String getStatus() { + return status; + } + + +} diff --git a/server/src/main/java/org/apache/rocketmq/studio/model/trace/ProducerNode.java b/server/src/main/java/org/apache/rocketmq/studio/model/trace/ProducerNode.java new file mode 100644 index 00000000..a3c40225 --- /dev/null +++ b/server/src/main/java/org/apache/rocketmq/studio/model/trace/ProducerNode.java @@ -0,0 +1,95 @@ +/* + * 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.rocketmq.studio.model.trace; + + +import java.util.List; + +public class ProducerNode { + private String msgId; + private String tags; + private String keys; + private String offSetMsgId; + private String topic; + private String groupName; + private TraceNode traceNode; + private List<TraceNode> transactionNodeList; + public String getMsgId() { + return msgId; + } + + public void setMsgId(String msgId) { + this.msgId = msgId; + } + + public String getTags() { + return tags; + } + + public void setTags(String tags) { + this.tags = tags; + } + + public String getKeys() { + return keys; + } + + public void setKeys(String keys) { + this.keys = keys; + } + + public String getOffSetMsgId() { + return offSetMsgId; + } + + public void setOffSetMsgId(String offSetMsgId) { + this.offSetMsgId = offSetMsgId; + } + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public String getGroupName() { + return groupName; + } + + public void setGroupName(String groupName) { + this.groupName = groupName; + } + + public TraceNode getTraceNode() { + return traceNode; + } + + public void setTraceNode(TraceNode traceNode) { + this.traceNode = traceNode; + } + + public List<TraceNode> getTransactionNodeList() { + return transactionNodeList; + } + + public void setTransactionNodeList(List<TraceNode> transactionNodeList) { + this.transactionNodeList = transactionNodeList; + } + +} diff --git a/server/src/main/java/org/apache/rocketmq/studio/model/trace/SubscriptionNode.java b/server/src/main/java/org/apache/rocketmq/studio/model/trace/SubscriptionNode.java new file mode 100644 index 00000000..b0239a7f --- /dev/null +++ b/server/src/main/java/org/apache/rocketmq/studio/model/trace/SubscriptionNode.java @@ -0,0 +1,41 @@ +/* + * 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.rocketmq.studio.model.trace; + + +import java.util.List; + +public class SubscriptionNode { + private String subscriptionGroup; + private List<TraceNode> consumeNodeList; + public String getSubscriptionGroup() { + return subscriptionGroup; + } + + public void setSubscriptionGroup(String subscriptionGroup) { + this.subscriptionGroup = subscriptionGroup; + } + + public List<TraceNode> getConsumeNodeList() { + return consumeNodeList; + } + + public void setConsumeNodeList(List<TraceNode> consumeNodeList) { + this.consumeNodeList = consumeNodeList; + } + +} diff --git a/server/src/main/java/org/apache/rocketmq/studio/model/trace/TraceNode.java b/server/src/main/java/org/apache/rocketmq/studio/model/trace/TraceNode.java new file mode 100644 index 00000000..921364ea --- /dev/null +++ b/server/src/main/java/org/apache/rocketmq/studio/model/trace/TraceNode.java @@ -0,0 +1,130 @@ +/* + * 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.rocketmq.studio.model.trace; + + +public class TraceNode { + private String requestId; + private String storeHost; + private String clientHost; + private int costTime; + private long beginTimestamp; + private long endTimestamp; + private int retryTimes; + private String status; + private String transactionState; + private String transactionId; + private boolean fromTransactionCheck; + private String msgType; + public String getRequestId() { + return requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getStoreHost() { + return storeHost; + } + + public void setStoreHost(String storeHost) { + this.storeHost = storeHost; + } + + public String getClientHost() { + return clientHost; + } + + public void setClientHost(String clientHost) { + this.clientHost = clientHost; + } + + public int getCostTime() { + return costTime; + } + + public void setCostTime(int costTime) { + this.costTime = costTime; + } + + public long getBeginTimestamp() { + return beginTimestamp; + } + + public void setBeginTimestamp(long beginTimestamp) { + this.beginTimestamp = beginTimestamp; + } + + public long getEndTimestamp() { + return endTimestamp; + } + + public void setEndTimestamp(long endTimestamp) { + this.endTimestamp = endTimestamp; + } + + public int getRetryTimes() { + return retryTimes; + } + + public void setRetryTimes(int retryTimes) { + this.retryTimes = retryTimes; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getTransactionState() { + return transactionState; + } + + public void setTransactionState(String transactionState) { + this.transactionState = transactionState; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public boolean isFromTransactionCheck() { + return fromTransactionCheck; + } + + public void setFromTransactionCheck(boolean fromTransactionCheck) { + this.fromTransactionCheck = fromTransactionCheck; + } + + public String getMsgType() { + return msgType; + } + + public void setMsgType(String msgType) { + this.msgType = msgType; + } + +}
