CN109150558B - Method, device and system for managing message queue nodes - Google Patents

Method, device and system for managing message queue nodes Download PDF

Info

Publication number
CN109150558B
CN109150558B CN201710450887.8A CN201710450887A CN109150558B CN 109150558 B CN109150558 B CN 109150558B CN 201710450887 A CN201710450887 A CN 201710450887A CN 109150558 B CN109150558 B CN 109150558B
Authority
CN
China
Prior art keywords
message queue
mbean
node
queue node
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710450887.8A
Other languages
Chinese (zh)
Other versions
CN109150558A (en
Inventor
赵力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710450887.8A priority Critical patent/CN109150558B/en
Publication of CN109150558A publication Critical patent/CN109150558A/en
Application granted granted Critical
Publication of CN109150558B publication Critical patent/CN109150558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method, a device and a system for managing message queue nodes, and relates to the field of computers. One embodiment of the method comprises: creating a communication protocol, and creating a management tool according to the communication protocol at least one message queue node; acquiring registration information sent by any one of the at least one message queue node to a distributed coordination server, and establishing connection with the message queue node based on the registration information; the message queue node is managed using the management tool. The implementation method can efficiently and safely carry out unified management on the message queue nodes in the distributed system, and has better expansibility.

Description

Method, device and system for managing message queue nodes
Technical Field
The present invention relates to the field of computers, and in particular, to a method, an apparatus, and a system for managing message queue nodes.
Background
At present, a JAVA application system based on distributed development can meet performance requirements of an internet platform such as high performance, high availability, and high architectural flexibility under high concurrency and high traffic requirements, so that the JAVA application system is rapidly developed. The message queue is used as an important communication mode among the distributed systems, can realize functions of system decoupling, asynchronous communication and the like, has the functions of improving the cooperation efficiency of the distributed systems and relieving cluster pressure, and is widely applied to the distributed systems.
In practical applications, consumption of the message queue often needs to be started and stopped frequently (hereinafter referred to as start-stop) according to business requirements, for example, a customs clearance system needs to start and stop consumption of the message queue according to business requirements in the process of interacting with each customs. The method for managing the start and stop of the message queue in the prior art mainly comprises the following steps:
1. the application itself provides an open portal, managed by manually configuring hosts files. The method has the disadvantages of inconvenient operation and large operation amount for multi-instance application.
2. And calling the message queue state by adopting a reflection method, and carrying out start-stop operation on the message queue state. The defects of the method are that the expansibility is lacked, code development is needed for each function addition, and the development process is complex and redundant.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
1. the efficiency is low: in the prior art, under the condition of more application examples, the single-point control has more complex management operation and lower efficiency.
2. Poor safety: the prior art open to the outside or reflection acquisition both have an impact on the security of the application itself.
3. Poor expansibility: in the prior art, each time the message queue is added for consumption, a control code needs to be developed independently, so that code redundancy and expansibility are poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a system for managing message queue nodes, which can efficiently and safely perform unified management on message queue nodes in a distributed system, and have better expansibility.
To achieve the above object, according to one aspect of the present invention, there is provided a method of managing a message queue node.
The method for managing the message queue nodes of the embodiment of the invention comprises the following steps: creating a communication protocol, and creating a management tool according to the communication protocol at least one message queue node; acquiring registration information sent by any one of the at least one message queue node to a distributed coordination server, and establishing connection with the message queue node based on the registration information; the message queue node is managed using the management tool.
Optionally, the distributed coordination server is a Zookeeper server, the communication protocol is a JMX protocol, and the management tool is a JMX protocol base component MBean.
Optionally, the message queue node includes: a producer of a message queue, a consumer of a message queue, or middleware of a message queue, the registration information comprising: IP address and port number of the message queue node.
Optionally, the creating a communication protocol includes: an identity of MBean is determined, and at least one management method for managing message queue nodes.
Optionally, the management method includes at least one of: start, pause, and status show.
Optionally, the MBean identifier, at least one message queue node topic corresponding to the MBean identifier, and at least one management method are encapsulated in the MBean.
Optionally, said managing the message queue node by using the management tool includes: determining MBean in the message queue node according to the MBean identifier; and calling the management method encapsulated in the MBean for the message queue node corresponding to the message queue node theme encapsulated in the MBean to manage.
To achieve the above object, according to another aspect of the present invention, there is provided an apparatus for managing message queue nodes.
The device for managing the message queue node of the embodiment of the invention comprises: a communication protocol creation module operable to create a communication protocol, create a management tool at least one message queue node according to the communication protocol; the connection establishing module is used for acquiring registration information sent by any one of the at least one message queue node to the distributed coordination server and establishing connection with the message queue node based on the registration information; a management module operable to manage the message queue node using the management tool.
Optionally, the distributed coordination server is a Zookeeper server, the communication protocol is a JMX protocol, and the management tool is a JMX protocol base component MBean.
Optionally, the message queue node includes: a producer of a message queue, a consumer of a message queue, or middleware of a message queue, the registration information comprising: IP address and port number of the message queue node.
Optionally, the communication protocol creating module is configured to: an identity of MBean is determined, and at least one management method for managing message queue nodes.
Optionally, the management method includes at least one of: start, pause, and status show.
Optionally, the MBean identifier, at least one message queue node topic corresponding to the MBean identifier, and at least one management method are encapsulated in the MBean.
Optionally, the management module is configured to: determining MBean in the message queue node according to the MBean identifier; and calling the management method encapsulated in the MBean for the message queue node corresponding to the message queue node theme encapsulated in the MBean to manage.
To achieve the above object, according to still another aspect of the present invention, there is provided a system for managing message queue nodes.
The system for managing the message queue nodes of the embodiment of the invention comprises the following components: the distributed coordination server side and a plurality of distributed coordination client sides; the distributed coordination client comprises a message queue management end and at least one message queue node; the message queue node is used for sending registration information to the distributed coordination server; creating a management tool according to the communication protocol created by the message queue management terminal; the distributed coordination server is used for receiving the registration information sent by the message queue node and sending the registration information to the message queue management terminal; the message queue management end is used for establishing connection with the message queue node by using the registration information; and managing the message queue nodes using the management tool after the connection is established.
Optionally, the distributed coordination server is a Zookeeper server, the distributed coordination client is a Zookeeper client, the communication protocol is a JMX protocol, and the management tool is a JMX protocol base component MBean.
Optionally, the message queue node includes: a producer of a message queue, a consumer of a message queue, or middleware of a message queue, the registration information comprising: the IP address and port number of the message queue node.
Optionally, the message queue management end is configured to create a communication protocol: an identity of MBean is determined, and at least one management method for managing message queue nodes.
Optionally, the management method includes at least one of: start, pause, and status show.
Optionally, the MBean identifier, at least one message queue node topic corresponding to the MBean identifier, and at least one management method are encapsulated in the MBean.
Optionally, the message queue management end is configured to: determining MBean in the message queue node according to the MBean identifier; and calling the management method encapsulated in the MBean for the message queue node corresponding to the message queue node theme encapsulated in the MBean to manage.
To achieve the above object, according to still another aspect of the present invention, there is provided an electronic apparatus.
An electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of managing a message queue node provided by the present invention.
To achieve the above object, according to still another aspect of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of the invention has stored thereon a computer program which, when being executed by a processor, carries out the method of managing message queue nodes as provided by the invention.
According to the technical scheme of the invention, one embodiment of the invention has the following advantages or beneficial effects: by combining the distributed coordination framework Zookeeper with the JMX protocol, the centralized unified, efficient and expandable function of managing the message queue nodes is realized in a distributed system, and the problems of low efficiency and poor expansibility of the conventional single-point control method are solved; by establishing the JMX protocol between the management end and the message queue node, only the management end meeting the JMX protocol can communicate with the message queue node, so that malicious access is avoided, the system safety is improved, and the problem of poor safety in the prior art is solved; by adopting non-invasive code development and introducing the light client, JMX protocol communication between the management end and the message queue node can be realized, so that the newly added message consumption node can be managed conveniently.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method of managing message queue nodes according to an embodiment of the invention;
FIG. 2 is a flow diagram illustrating a method of managing message queue nodes according to an embodiment of the invention;
fig. 3 is a main part schematic diagram of an apparatus for managing a message queue node according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of the components of a system for managing message queue nodes according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic device for implementing the method for managing message queue nodes according to the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The technical scheme of the embodiment of the invention is that a distributed coordination framework is adopted: zoo managers (Zookeeper) and Java Management Extensions (JMX) protocols are combined, centralized unified, efficient and expandable Management message queue functions are realized in a distributed system, and the problems of low efficiency and poor expansibility of the existing single-point control method are solved; by establishing the JMX protocol between the management end and the message queue node, only the management end meeting the JMX protocol can communicate with the message queue node, so that malicious access is avoided, the system safety is improved, and the problem of poor safety in the prior art is solved; by adopting non-invasive code development and introducing the light client, JMX protocol communication between the management end and the message queue node can be realized, so that the newly added message consumption node can be managed conveniently.
Fig. 1 is a schematic diagram of the main steps of a method of managing message queue nodes according to the present embodiment.
As shown in fig. 1, the method for managing message queue nodes according to the embodiment of the present invention mainly includes the following steps:
step S101: a communication protocol is created, and a management tool is created at least one message queue node according to the communication protocol.
In the embodiment of the present invention, before step S101, a distributed coordination framework is first established for implementing management of message queue nodes, where the distributed coordination framework includes a distributed coordination server and a plurality of distributed coordination clients. Generally, the message queue management end and the at least one message queue node are both distributed coordination clients.
In practical application, the distributed coordination framework is specifically a Zookeeper of the distributed application program coordination framework, the distributed coordination server is a Zookeeper server, and the message queue management end and the at least one message queue node are Zookeeper clients.
In the embodiment of the invention, the Zookeeper server provides functions of configuration maintenance, name service and cluster management, stores various data of the message queue node in a Zookeeper file system, and simultaneously stores information of the online and offline of the message queue node. The message queue management end acquires the start-stop state of the message queue node by connecting the Zookeeper server end, and further communicates with the message queue node, so that the message queue node is managed. The message queue node is connected with the Zookeeper server to realize service registration, and provides communication content according to a communication protocol established by the message queue management terminal. The message queue node may be: a producer of a message queue, a consumer of a message queue, or middleware of a message queue. In a specific application, the purpose of starting and stopping the consumption of the message queue is generally achieved by middleware for controlling the message queue.
In this step, a message queue management end creates a communication protocol, and a management tool is created at least one message queue node according to the communication protocol.
In practical application, the communication protocol is JMX protocol. The JMX protocol can monitor information such as a memory on a Java Virtual Machine (JVM), a Central Processing Unit (CPU) load, and the like, manage applications on the JVM, and solve problems in distributed management, and the JMX protocol manages with a JMX protocol base component MBean as a basic class Unit.
In this step, the message queue management end creates a communication protocol specifically as follows: and the message queue management end determines the MBean identification and at least one management method. In general, the management method may be: start, pause, and status show. The starting method is used for starting the message queue node in the pause state, the pause method is used for pausing the message queue node in the starting state, and the state display node is used for displaying the starting state or the pause state of the message queue node.
Thus, the message queue management end establishes a JMX protocol, determines the identifier, the attribute and the function of the MBean, and is used for subsequent communication with the message queue node.
In the embodiment of the present invention, creating a management tool at a message queue node according to a communication protocol specifically includes: the message queue node creates MBean, wherein the MBean is packaged with an identifier of the MBean, at least one message queue node theme corresponding to the identifier of the MBean, and at least one management method.
In the specific application, after the JMX protocol is established by the message queue management end, the message queue nodes obey the JMX protocol, quote a Jar package (Java ARchive) provided by the message queue management end, and establish MBean. Generally, a message queue node registers MBean in a base component container MBeanServer, where MBean encapsulates map set information, where the map set information stores a mapping relationship between an identifier ObjectName (identifier of a base component) of MBean determined by a message queue manager and a topic of the message queue node, and the MBean further encapsulates at least one management method determined by the message queue manager. Generally, map set information is stored in the form of an XML (eXtensible Markup Language) file. Wherein the management method comprises one or more of the following methods: start, pause, and status show.
Thus, by establishing the MBean and loading the MBean information in the MBean Server, the message queue node and the message queue management end realize the consistency of the communication protocol, and the message queue management end can determine the corresponding MBean through the ObjectName, thereby managing the message queue node.
Step S102: and acquiring registration information sent by any one of the at least one message queue node to a distributed coordination server, and establishing connection with the message queue node based on the registration information.
In the embodiment of the invention, after the Zookeeper framework is established, each message queue node serving as the Zookeeper client uploads the registration information to the Zookeeper server to realize service registration. The registration information generally includes: the IP address and port number of the message queue node.
In this step, the message queue management end firstly uses the notification mechanism of the Zookeeper to obtain the registration information from the Zookeeper server end, so as to realize the service discovery function; and then establishing connection with the message queue node by using the IP address and the port number of the message queue node included in the registration information.
Step S103: the message queue node is managed using the management tool.
In a specific application, after establishing a connection with a message queue node, a message queue management end can determine a corresponding MBean through an identifier ObjectName of the MBean, further determine a topic of the message queue node to be managed from the MBean, finally determine the message queue node corresponding to the topic, and select one or more management methods to operate the message queue node, thereby realizing the management of the message queue node.
In practical application, when a message queue management end performs start-stop management on a certain message queue node, the message queue management end generally obtains that the message queue node is in a start state or a pause state through a state display method, and then manages the message queue node through the start method or the pause method.
Through the steps, the method for managing the message queue nodes in the embodiment of the invention realizes the functions of centralization and unified management of the message queue nodes in a distributed application system, and can perform operations such as state display, starting or suspension and the like on any message queue node according to business requirements.
Particularly, in the embodiment of the present invention, the Zookeeper server may store information of the online and offline of the message queue node, so as to detect the online state of the message queue node in real time. If the newly added node needs to be managed, the IP address and the port number of the newly added node are sent to the message queue management end, and the message queue management end can supplement the newly added node topic in the map set information, so that the newly added node can be managed.
It should be noted that, the method for managing message queue nodes according to the embodiment of the present invention may adopt other distributed coordination systems with similar functions besides Zookeeper and communication protocols with similar functions besides JMX to implement the function of managing message queue nodes.
Fig. 2 is a flowchart illustrating a method of managing message queue nodes according to an embodiment of the present invention.
As shown in fig. 2, the method for managing message queue nodes according to the embodiment of the present invention is implemented by the following steps: establishing a Zookeeper server, registering a message queue node service, loading a message queue node MBean, discovering a message queue management terminal service, establishing connection between the message queue management terminal and the message queue node, and managing the message queue node by the message queue management terminal through a JMX protocol.
From the above description, it can be seen that, by adopting the technical means of combining the distributed coordination framework Zookeeper with the JMX protocol, a centralized unified, efficient and expandable function of managing message queues is realized in the distributed system, and the problems of low efficiency and poor expansibility of the existing single-point control method are solved; by establishing the JMX protocol between the management end and the message queue node, only the management end meeting the JMX protocol can communicate with the message queue node, so that malicious access is avoided, the system safety is improved, and the problem of poor safety in the prior art is solved; by adopting non-invasive code development and introducing the light client, JMX protocol communication between the management end and the message queue node can be realized, so that the newly added message consumption node can be managed conveniently.
Fig. 3 is a main part schematic diagram of an apparatus for managing a message queue node according to an embodiment of the present invention.
As shown in fig. 3, an apparatus 300 for managing a message queue node according to an embodiment of the present invention includes: a communication protocol creation module 301, a connection establishment module 302, and a management module 303. Wherein:
the communication protocol creation module 301 may be used to create a communication protocol according to which a management tool is created at least one message queue node.
The connection establishing module 302 may be configured to acquire registration information sent by any one of the at least one message queue node to the distributed coordination server, and establish a connection with the message queue node based on the registration information.
The management module 303 may be used to manage the message queue node using the management tool.
In practical application, the distributed coordination server is a Zookeeper server, the communication protocol is a JMX protocol, and the management tool is a JMX protocol base component MBean.
Preferably, in a preferred embodiment of the present invention, the message queue node may include: a producer of the message queue, a consumer of the message queue, or middleware of the message queue, the registration information may include: IP address and port number of the message queue node.
In this embodiment of the present invention, the communication protocol creating module 301 is configured to: the identity of MBean, and at least one management method are determined. The management method comprises at least one of the following: start, pause, and status show.
As a preferred solution, the communication protocol creating module 301 is configured to: creating MBean in any one of the at least one message queue node, wherein the MBean has an identifier of the MBean, at least one message queue node topic corresponding to the identifier of the MBean, and at least one management method.
Furthermore, in a preferred embodiment of the present invention, the management module 303 is configured to: determining MBean in the message queue node according to the MBean identifier; and calling a management method packaged in the MBean for the message queue node corresponding to the message queue node theme packaged in the MBean to manage.
Fig. 4 is a schematic diagram of the components of a system for managing message queue nodes according to an embodiment of the present invention.
As shown in fig. 4, a system for managing message queue nodes according to an embodiment of the present invention may include: the distributed coordination server 401 is in communication with a plurality of distributed coordination clients. The distributed coordination client includes a message queue management node 402 and at least one message queue node 403. Wherein:
the message queue node 403 may be configured to send registration information to the distributed coordination server 401; and creating a management tool according to the communication protocol established by the message queue management terminal 402.
The distributed coordination server may be configured to receive registration information of the message queue node 403, and send the registration information to the message queue management terminal 402.
The message queue management terminal 402 may be configured to establish a connection with the message queue node 403 by using the acquired registration information of the message queue node 403; and manages the message queue nodes 403 using the management tool after the connection is established.
In this embodiment of the present invention, the distributed coordination server is a Zookeeper server, the distributed coordination client is a Zookeeper client, the communication protocol is a JMX protocol, the management tool is a JMX protocol base component MBean, and the message queue node includes: a producer of a message queue, a consumer of a message queue, or middleware of a message queue, the registration information comprising: the IP address and port number of the message queue node.
In practical applications, the message queue management end 402 can be used to create a communication protocol; the creating a communication protocol includes: the identity of MBean, and at least one management method are determined. The management method comprises at least one of the following: start, pause, and status show. The message queue node 403 may be configured to: after the message queue management end establishes a communication protocol, creating MBean, wherein the MBean is packaged with an identifier of the MBean, at least one message queue node theme corresponding to the identifier of the MBean, and at least one management method.
Furthermore, in this embodiment of the present invention, the message queue managing end 402 may be configured to: determining MBean in the message queue node according to the MBean identifier; and calling a management method packaged in the MBean for the message queue node corresponding to the message queue node theme packaged in the MBean to manage.
The invention also provides the electronic equipment.
The electronic device of the embodiment of the invention comprises: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of managing a message queue node provided by the present invention.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the computer system 500 are also stored. The CPU501, ROM 502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, the processes described in the main step diagrams above may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the main step diagram. In the above-described embodiment, the computer program can be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the central processing unit 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a communication protocol creation module, a connection establishment module, and a management module. Where the names of these elements do not in some cases constitute a limitation of the element itself, for example, the communication protocol creation module may also be described as "an element sending management tools to a connected management module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to perform steps comprising: creating a communication protocol, and creating a management tool according to the communication protocol at least one message queue node; acquiring registration information sent by any one of the at least one message queue node to a distributed coordination server, and establishing connection with the message queue node based on the registration information; the message queue node is managed using the management tool.
According to the technical scheme of the embodiment of the invention, by combining the distributed coordination framework Zookeeper with the JMX protocol, the centralized unified, efficient and expandable management function of the message queue is realized in the distributed system, and the problems of low efficiency and poor expansibility of the conventional single-point control method are solved; by establishing the JMX protocol between the management end and the message queue node, only the management end meeting the JMX protocol can communicate with the message queue node, so that malicious access is avoided, the system safety is improved, and the problem of poor safety in the prior art is solved; by adopting non-invasive code development and introducing the light client, JMX protocol communication between the management end and the message queue node can be realized, so that the newly added message consumption node can be managed conveniently.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for managing message queue nodes is executed at a message queue management end; it is characterized by comprising:
creating a communication protocol JMX, and creating a management tool MBean at least one message queue node according to the communication protocol; the create communication protocol JMX includes: determining the identity of MBean and at least one management method for managing the message queue nodes; the management method comprises at least one of the following: starting, pausing and state displaying; the message queue management end and the at least one message queue node are distributed coordination clients based on a distributed coordination framework Zookeeper; the MBean is packaged with the MBean identifier, at least one message queue node theme corresponding to the MBean identifier and at least one management method;
acquiring registration information sent by any one of the at least one message queue node to a distributed coordination server, and establishing connection with the message queue node based on the registration information; the distributed coordination server is a Zookeeper server;
determining MBean in the message queue node according to the MBean identifier; and calling the management method encapsulated in the MBean for the message queue node corresponding to the message queue node theme encapsulated in the MBean to manage.
2. The method of claim 1, wherein the message queue node comprises: a producer of a message queue, a consumer of a message queue, or middleware of a message queue, the registration information comprising: IP address and port number of the message queue node.
3. A device for managing message queue nodes is executed at a message queue management end; it is characterized by comprising:
the communication protocol creating module is used for creating a communication protocol JMX and creating a management tool MBean at least one message queue node according to the communication protocol; the communication protocol creation module is further to: determining the identity of MBean and at least one management method for managing the message queue nodes; the management method comprises at least one of the following: starting, pausing and state displaying; the message queue management end and the at least one message queue node are distributed coordination clients based on a distributed coordination framework Zookeeper; the MBean is packaged with the MBean identifier, at least one message queue node theme corresponding to the MBean identifier and at least one management method;
the connection establishing module is used for acquiring registration information sent by any one message queue node in the at least one message queue node to the distributed coordination server and establishing connection with the message queue node based on the registration information; the distributed coordination server is a Zookeeper server;
the management module is used for determining MBean in the message queue node according to the MBean identifier; and calling the management method encapsulated in the MBean for the message queue node corresponding to the message queue node theme encapsulated in the MBean to manage.
4. The apparatus of claim 3, wherein the message queue node comprises: a producer of a message queue, a consumer of a message queue, or middleware of a message queue, the registration information comprising: IP address and port number of the message queue node.
5. A system for managing message queue nodes, comprising: the distributed coordination server side and the distributed coordination clients are based on a distributed coordination framework Zookeeper; the distributed coordination client comprises a message queue management end and at least one message queue node; wherein the content of the first and second substances,
the message queue node is used for sending registration information to the distributed coordination server; creating a management tool MBean according to a communication protocol JMX created by the message queue management end; the message queue management end creates a communication protocol JMX, which comprises the following steps: the message queue management end determines the MBean identifier and at least one management method for managing the message queue nodes; the management method comprises at least one of the following: starting, pausing and state displaying; the MBean is packaged with the MBean identifier, at least one message queue node theme corresponding to the MBean identifier and at least one management method;
the distributed coordination server is used for receiving the registration information sent by the message queue node and sending the registration information to the message queue management terminal;
the message queue management end is used for establishing connection with the message queue node by using the registration information; after the connection is established, determining MBean in the message queue node according to the MBean identifier; and calling the management method encapsulated in the MBean for the message queue node corresponding to the message queue node theme encapsulated in the MBean to manage.
6. The system of claim 5, wherein the message queue node comprises: a producer of a message queue, a consumer of a message queue, or middleware of a message queue, the registration information comprising: the IP address and port number of the message queue node.
7. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of claim 1 or 2.
8. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of claim 1 or 2.
CN201710450887.8A 2017-06-15 2017-06-15 Method, device and system for managing message queue nodes Active CN109150558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710450887.8A CN109150558B (en) 2017-06-15 2017-06-15 Method, device and system for managing message queue nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710450887.8A CN109150558B (en) 2017-06-15 2017-06-15 Method, device and system for managing message queue nodes

Publications (2)

Publication Number Publication Date
CN109150558A CN109150558A (en) 2019-01-04
CN109150558B true CN109150558B (en) 2022-03-11

Family

ID=64829702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710450887.8A Active CN109150558B (en) 2017-06-15 2017-06-15 Method, device and system for managing message queue nodes

Country Status (1)

Country Link
CN (1) CN109150558B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158610B (en) * 2019-12-31 2022-02-22 苏州浪潮智能科技有限公司 Method, device and equipment for synchronously setting cache acceleration and readable medium
CN111314241B (en) * 2020-01-17 2024-03-29 新华智云科技有限公司 Task scheduling method and scheduling system
CN111541667A (en) * 2020-04-16 2020-08-14 广东好太太科技集团股份有限公司 Method, equipment and storage medium for intersystem message communication
CN111586171B (en) * 2020-05-07 2023-05-30 广州虎牙信息科技有限公司 Server operation method and device, electronic equipment and storage medium
CN111652691A (en) * 2020-06-09 2020-09-11 北京字节跳动网络技术有限公司 Order information processing method and device and electronic equipment
CN112162868B (en) * 2020-08-28 2022-05-13 广州南方卫星导航仪器有限公司 Data communication method, device and storage medium applied to cluster processing
CN112445631A (en) * 2020-12-02 2021-03-05 广东博智林机器人有限公司 RTPS process communication method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072129A (en) * 2007-06-25 2007-11-14 北京邮电大学 JMX based network service management method and its application system
CN101710281A (en) * 2009-12-11 2010-05-19 西安电子科技大学 Dynamic integrated system and method of development platform based on Agent
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10476938B2 (en) * 2014-01-21 2019-11-12 Oracle International Corporation System and method for multitenancy store in a multitenant application server environment
US10027728B2 (en) * 2015-03-06 2018-07-17 Ebay Inc. Systems and methods of streaming data
CN105610947A (en) * 2015-12-30 2016-05-25 青岛海尔智能家电科技有限公司 Method, device and system for realizing high-available distributed queue service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072129A (en) * 2007-06-25 2007-11-14 北京邮电大学 JMX based network service management method and its application system
CN101710281A (en) * 2009-12-11 2010-05-19 西安电子科技大学 Dynamic integrated system and method of development platform based on Agent
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于云平台的服务器监控系统设计;吴夫丹;《中国优秀硕士学位论文全文数据库•信息科技辑》;20150115;正文第1.1节、2.2.3、2.4、4.3.1节,图2.8) *

Also Published As

Publication number Publication date
CN109150558A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN109150558B (en) Method, device and system for managing message queue nodes
US11656852B2 (en) System and method for autowiring of a microservice architecture
US9244817B2 (en) Remote debugging in a cloud computing environment
US7992132B2 (en) Server side application integration framework
US9053580B2 (en) Data processing environment integration control interface
CN108733461B (en) Distributed task scheduling method and device
US9753786B2 (en) Client server communication system
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN107729176B (en) Disaster recovery method and disaster recovery system for configuration file management system
CN109995801B (en) Message transmission method and device
US10079865B2 (en) Method and system for an ontology based request/reply service
CN109783151B (en) Method and device for rule change
US8543680B2 (en) Migrating device management between object managers
CN114077367A (en) Method and device for realizing shortcut of android application in Linux system
CN115114044A (en) Message pushing method, device, equipment and medium
US7673056B1 (en) Redirection gateway
CN114489954A (en) Tenant creation method based on virtualization platform, tenant access method and equipment
CN113971098A (en) RabbitMQ consumption management method and system
CN108989157B (en) Method and device for controlling intelligent equipment
US20130007094A1 (en) Client server communication system
CN114785861A (en) Service request forwarding system, method, computer equipment and storage medium
CN115225482A (en) Method and device for configuring Pod network based on Kubernetes
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product
CN114968636A (en) Fault processing method and device
CN111045778B (en) Virtual machine creation method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant