Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The realization method of RocketMQ Operation and maintenance Monitoring

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "the realization method of RocketMQ operation and maintenance monitoring". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "the implementation method of RocketMQ operation and maintenance monitoring".

A perfect message middleware, monitoring is an essential function. Through monitoring, we can check the operation of the system, whether there are anomalies, is the basis of system stability and operation and maintenance.

1. Build the monitoring platform.

Download address: https://github.com/apache/rocketmq-externals

The RocketMQ console needs to download and compile the package itself. You can set its namesrvAddr and port number at compile time, or specify these parameters when the program starts (SpringBoot project).

Use maven to package

Mvn clean package-Dmaven.test.skip=true

Startup program

Nohup java-jar rocketmq-console-ng-1.0.0.jar-server.port=8080-rocketmq.config.namesrvAddr=10.10.15.246:9876;10.10.15.246:9876 &

Browser access

The console not only has relevant system monitoring data, but also has operation and maintenance functions, such as creating topics, modifying topics, deleting topics, topic list information, topic configuration information, topic all consumption group information, consumption progress in each queue of each consumption group, Broker node information, message query and so on.

The query of the most commonly used messages, you can view its detailed message information

Consumption progress inquiry

Other functions can be seen by yourself.

2. Operation and maintenance orders

Let's take a look at the console commands provided by RocketMQ itself.

Let's analyze the key common commands.

2.1.Create an update theme (updateTopic). / mqadmin updateTopic-b 10.10.15.247 TopicCmd 10911-t TopicCmd

For more information on the parameters, please see the prompt.

2.2.Delete the theme (deleteTopic). / mqadmin deleteTopic-n 10.10.15.246 TopicCmd 9876-c 10.10.15.246 TopicCmd 10911-t

2.3.Create update consumption group (updateSubGroup). / mqadmin updateSubGroup-n 10.10.15.246 GroupTest 9876-b 10.10.15.247 GroupTest 10911-g

2.4.Delete the consumer group (deleteSubGroup). / mqadmin deleteSubGroup-n 10.10.15.246 GroupTest 9876-b 10.10.15.246 GroupTest 10911-g

2.5. Topic queue information (topicStatus). / mqadmin topicStatus-n 10.10.15.246 TopicTest 9876-t TopicTest

2.6.The topic routing information (topicRoute). / mqadmin topicRoute-n 10.10.15.246 TopicTest 9876-t TopicTest

2.7. list of topics (topicList). / mqadmin topicList-n 10.10.15.246 purl 9876

2.8.The Broker node information (brokerStatus). / mqadmin brokerStatus-n 10.10.15.246 mqadmin brokerStatus 9876-b 10.10.15.246 purl 10911

2.9. query the message through KEY (queryMsgByKey). / mqadmin queryMsgByKey-n 10.10.15.246 purl 9876-k 2000000-t TopicTest

Note that there may be multiple messages when KEY is set up by the user for all queries

2.10. Query the message (queryMsgById) through the ID of the message. / mqadmin queryMsgById-I 0A0A0FF600002A9F000000000180DD31

Let's take a look at how the offsetMsgId of the message is found. There is relevant information in the information returned by the message sent.

Let's take a look at the path of the message body that was queried.

2.11. Print the message (printMsg). / mqadmin printMsg-n 10.10.15.246 TopicTest 9876-t TopicTest-b 2019-07-2607Parade 5000VOG 000-e 2019-07-2609RV 0000Solo000

2.12. Check the consumption status (brokerConsumeStats). / mqadmin brokerConsumeStats-b 10.10.15.246 purl 10911

2.13. Node information of the cluster (clusterList). / mqadmin clusterList-n 10.10.15.246 virtual 9876

2.14. Status information of overall consumption (statsAll). / mqadmin statsAll-n 10.10.15.246 pur9876

2.15. View the consumer information under the consumer group (consumerConnection). / mqadmin consumerConnection-n 10.10.15.246 group_name_1 9876-g

2.16. Consumption Progress Information (consumerProgress). / mqadmin consumerProgress-n 10.10.15.246 Vol 9876

2.17. Reset the consumption point (resetOffsetByTime). / mqadmin resetOffsetByTime-n 10.10.15.246 TopicTest 9876-t TopicTest-g group_name_1-s 2019-07-26 consumption 07Plus 0000VOO

2.18. Message queue load (allocateMQ). / mqadmin allocateMQ-t TopicTest-I 192.168.1.104 Magazine 10.10.14.163-n 10.10.15.246 purl 9876

2.19. Test the performance of Broker to receive messages (sendMsgStatus). / mqadmin sendMsgStatus-n 10.10.15.246 broker-a 9876-b broker-a-c 3

2.20. Test the performance of cluster message delivery (clusterRT). / mqadmin clusterRT-n 10.10.15.246 pur9876-s 128

2.21. View Broker configuration information (getBrokerConfig). / mqadmin getBrokerConfig-b 10.10.15.246 mqadmin getBrokerConfig 10911

At this point, I believe you have a deeper understanding of "the implementation of RocketMQ operation and maintenance monitoring". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report