Message notification method and device, equipment and storage medium

By starting the preset notification service on devices with limited resources and using sockets for message push processing, the problem of high availability and configuration complexity of message queues on devices with limited resources is solved, and an efficient and easy-to-use message queue function is realized.

CN118555264APending Publication Date: 2024-08-27CETC CYBERSPACE SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410782776.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When existing message queue software is run on a device with limited resources, it takes up a lot of resources and has complex configuration, making it difficult to implement an easy-to-use, highly available message queue.

Method used

By starting the preset notification service on the cluster node, the message notification mechanism is automatically established, and the preset publisher and subscriber programs are used to push and process messages through sockets without additional configuration, achieving efficient delivery and caching of messages between nodes.

Benefits of technology

It realizes the construction of a highly available message queue on a device with limited resources, reduces resource occupation, simplifies the configuration process, and improves the ease of use and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555264A
    Figure CN118555264A
Patent Text Reader

Abstract

The invention discloses a message notification method and device, equipment and a storage medium, and relates to the technical field of information, and the method comprises the steps: automatically building a message notification mechanism in a current cluster through starting a preset notification service of each node in the current cluster; pushing a to-be-published theme message to a preset notification service corresponding to a main node in a current cluster through a current message publishing node based on a preset publisher program of the current message publishing node and the preset notification service of the current message publishing node; wherein the message publishing node is any node in the current cluster; and pushing the theme message to preset notification services of other slave nodes in the current cluster through a preset publisher program of the master node and a preset notification service of the master node so as to complete corresponding message notification operation, so that each node in the current cluster processes the received theme message by using a preset subscriber program of the master node. In this way, the high-availability message queue can be effectively constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a message notification method, device, equipment and storage medium. Background Art

[0002] MQ (Message Queue) software such as RabbitMQ, RocketMQ, ActiveMQ, Kafka (also known as Apache Kafka), ZeroMQ (also known as ZMQ), MetaMQ (also known as Metamorphosis MQ, a high-performance, highly available, and scalable distributed message middleware) can provide complete message queue functions, but they occupy more resources such as memory, disk, and CPU (Central Processing Unit), and their configuration is more complicated. Some of the above-mentioned MQ software have multi-machine cluster high availability capabilities, and the configuration to achieve high availability is even more complicated.

[0003] For products running on devices with limited resources, especially when multiple virtual machine clusters are running on one device, if the above MQ software is deployed in it, firstly, the CPU, memory, disk and other resources of each device / virtual machine are insufficient to support it; secondly, each virtual machine cluster needs to build a high-availability MQ cluster, and its configuration is quite complicated and inconvenient to use.

[0004] To sum up, in the above scenarios, how to implement a message queue that is easy to use, occupies very few resources, and is highly available is a problem that needs to be solved urgently. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a message notification method, device, equipment and storage medium, which can effectively build a highly available message queue with very few resources. The specific scheme is as follows:

[0006] In a first aspect, the present application provides a message notification method, comprising:

[0007] Automatically establish a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster;

[0008] The current message publishing node pushes the subject message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster;

[0009] The topic message is pushed to the preset notification services of the remaining slave nodes in the current cluster through the preset publisher program of the master node itself and its own preset notification service to complete the corresponding message notification operation, so that each node in the current cluster can use its own preset subscriber program to process the received topic message.

[0010] Optionally, after automatically establishing a message notification mechanism in the current cluster by starting a preset notification service of each node in the current cluster, the method further includes:

[0011] The address, type and specification of each of the nodes are registered in the current cluster.

[0012] Optionally, each of the nodes in the current cluster processes the received topic message using its own preset subscriber program, including:

[0013] After searching for all target subscribers subscribed to the current topic on its own node, each node in the current cluster pushes the topic message to the preset notification service corresponding to the target subscriber in itself through its own preset publisher program;

[0014] Calling the software development kit of its own preset notification service through its own preset subscriber program;

[0015] The received topic message is processed through a socket based on the obtained software development kit.

[0016] Optionally, the method further includes:

[0017] After the preset notification service of each of the nodes in the current cluster receives the topic message, if the target subscriber program subscribing to the current topic is not online, the topic message is cached until the target subscriber program comes back online.

[0018] Optionally, the method further includes:

[0019] After the message is pushed successfully or the corresponding target subscriber program has not been online for more than a preset period of time, the subject message is deleted from its own cache.

[0020] Optionally, the pushing of the to-be-published topic message to the preset notification service corresponding to the master node in the current cluster by the current message publishing node based on its own preset publisher program and its own preset notification service includes:

[0021] The current message publishing node calls the software development kit of its own preset notification service based on its own preset publisher program;

[0022] Based on the obtained software development kit, a topic message is published to the preset notification service of the same through a socket, so that the preset notification service pushes the topic message to the preset notification service corresponding to the master node in the current cluster.

[0023] Optionally, the method further includes:

[0024] The preset subscriber program and the preset publisher program of each node in the current cluster send the registration account to the notification service of the node through socket for authentication;

[0025] If the authentication fails, the corresponding registration account generation and sending operations are performed based on the preset notification service itself.

[0026] In a second aspect, the present application provides a message notification device, comprising:

[0027] The mechanism establishment module is used to automatically establish a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster;

[0028] A first message notification module, configured to push the subject message to be published to the preset notification service corresponding to the master node in the current cluster through the current message publishing node based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster;

[0029] The second message notification module is used to push the topic message to the preset notification services of the remaining slave nodes in the current cluster through the preset publisher program of the master node itself and its own preset notification service to complete the corresponding message notification operation, so that each of the nodes in the current cluster can use its own preset subscriber program to process the received topic message.

[0030] In a third aspect, the present application provides an electronic device, including:

[0031] Memory, used to store computer programs;

[0032] The processor is used to execute the computer program to implement the steps of the aforementioned message notification method.

[0033] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the steps of the aforementioned message notification method when executed by a processor.

[0034] It can be seen that in this application, the message notification mechanism in the current cluster is automatically established by starting the preset notification service of each node in the current cluster; the current message publishing node pushes the subject message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster; the subject message is pushed to the preset notification service of the remaining slave nodes in the current cluster through the preset publisher program of the master node itself and its own preset notification service to complete the corresponding message notification operation, so that each of the nodes in the current cluster uses its own preset subscriber program to process the received subject message. That is to say, this application automatically establishes the message notification mechanism in the current cluster by starting the preset notification service of each node in the current cluster, and then publishes information through the message publishing node and the preset publisher program of each slave node in turn, so that each of the nodes in the current cluster uses its own preset subscriber program to process the received subject message. In this way, it is possible to effectively build a highly available message queue with very few resources without any configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0036] Figure 1 A flow chart of a message notification method provided by this application;

[0037] Figure 2 A flowchart of a message notification method provided by this application;

[0038] Figure 3 A schematic diagram of the structure of a message notification device provided by this application;

[0039] Figure 4 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] For equipment products running on limited resources, especially when multiple virtual machine clusters are running on one device, such as deploying MQ software such as RabbitMQ, RocketMQ, ActiveMQ, Kafka, ZeroMQ, MetaMQ, etc., firstly, the CPU, memory, disk and other resources of each device / virtual machine are insufficient to support; secondly, each virtual machine cluster needs to build a high-availability MQ cluster, and its configuration is quite complicated and inconvenient to use. To this end, this application provides a message notification solution that can effectively build a highly available message queue with very few resources.

[0042] See also Figure 1 As shown, an embodiment of the present invention discloses a message notification method, including:

[0043] Step S11: Automatically establish a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster.

[0044] Specifically, this embodiment needs to first automatically establish a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster, and this process does not require any configuration. It can be understood that the current cluster includes more than two nodes. In addition, after the message notification mechanism within the current cluster is automatically established by starting the preset notification service of each node in the current cluster, it also includes: registering the address, type and specification of each node in the current cluster. That is, each node in the same cluster establishes a cluster real-time message channel by starting the notification service, and each provides a message queue service for the local program through the message channel.

[0045] It should be understood that in this embodiment, regarding the notification service, each node in the current cluster runs this service. The service does not require any configuration and is responsible for automatically establishing a cluster real-time message channel and registering and publishing the address, type, and specification information of the node to the cluster.

[0046] Furthermore, regarding the establishment of a message notification mechanism within the current cluster, each node in the current cluster starts the preset subscriber program and the preset publisher program as needed. Then the preset subscriber program and the preset publisher program to which it belongs call the SDK (Software Development Kit) and send a registered account to the notification service of this node through a socket for authentication; if the program is not registered, the notification service generates and sends a registered account for it, and the program saves the registered account. That is, the preset subscriber program and the preset publisher program of each of the nodes in the current cluster send a registered account to the notification service of this node through a socket for authentication; if the authentication fails, the corresponding registration account generation and sending operations are performed based on the preset notification service of itself.

[0047] Afterwards, the notification service of each node records the corresponding relationship between the socket, registered account and message topic of each subscriber program in the cache. It should be understood that the preset subscriber program of each node subscribes to messages by topic to the local notification service through the socket; the preset publisher program of each node publishes messages by topic to the local notification program through the socket, and the notification service pushes messages to the cluster through the cluster real-time message channel, and pushes messages to the local subscriber program or caches messages according to the situation;

[0048] Step S12: The current message publishing node pushes the subject message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster.

[0049] Combination Figure 2 As shown, in this embodiment, when a node needs to publish a message on a certain topic, the message will be delivered to the notification service of this node through a socket. That is, the current message publishing node pushes the topic message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service, including: the current message publishing node calls the software development kit of its own preset notification service based on its own preset publisher program; based on the obtained software development kit and through a socket, publishes the topic message to its own preset notification service, so that the preset notification service pushes the topic message to the preset notification service corresponding to the master node in the current cluster.

[0050] It can be understood that the notification service of the message publishing node first pushes the message to the current Master node, that is, the notification service of the master node, and then searches for all local subscribers who have subscribed to this topic, and pushes it to the preset subscriber program through the socket, so that the local preset subscriber program can receive and process the message.

[0051] Step S13: Push the topic message to the preset notification services of the remaining slave nodes in the current cluster through the preset publisher program of the master node itself and its preset notification service to complete the corresponding message notification operation, so that each node in the current cluster can use its own preset subscriber program to process the received topic message.

[0052] Specifically, in this embodiment, each of the nodes in the current cluster processes the received topic message using its own preset subscriber program, including: after each of the nodes in the current cluster searches for all target subscribers subscribed to the current topic on its own node, it pushes the topic message to the preset notification service corresponding to the target subscriber in itself through its own preset publisher program; calls the software development kit of its own preset notification service through its own preset subscriber program; and processes the received topic message through a socket based on the obtained software development kit. That is, after receiving the message, the notification service of the Master node first pushes the message to other Slave nodes, that is, the notification service of the slave node, and then searches for all subscribers of the local machine that subscribe to this topic, and pushes it to the preset subscriber program through a socket, so that the preset subscriber program of the local machine receives and processes the message.

[0053] At the same time, after receiving the message, the notification service of other Slave nodes searches for all local subscribers who have subscribed to this topic, and pushes it to the preset subscriber program through the socket, so that the preset subscriber program of the local node receives and processes the message.

[0054] Furthermore, in this embodiment, the following may be specifically included: after the preset notification service of each node in the current cluster receives the topic message, if the target subscriber program subscribing to the current topic is not online, the topic message is cached until the target subscriber program is back online. Furthermore, after the message is successfully pushed or the corresponding target subscriber program is not online for more than a preset time period, the topic message is deleted from its own cache.

[0055] In addition, when the notification service of the Master node goes offline, each node caches the messages of the topics required by the subscribers of this node, so the messages are not lost. After that, a new Master node will be re-elected, and each Slave node will immediately establish a cluster synchronization channel with the new Master node, thereby realizing a highly available message queue.

[0056] In summary, in this embodiment, since the notification service is developed in C++ language, the notification services between nodes interact through sockets, and its processing logic is relatively simple, so it occupies less resources.

[0057] It can be seen that in the embodiment of the present application, the message notification mechanism in the current cluster is automatically established by starting the preset notification service of each node in the current cluster; the current message publishing node pushes the subject message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster; the preset publisher program of the master node itself and its own preset notification service push the subject message to the preset notification service of the remaining slave nodes in the current cluster to complete the corresponding message notification operation, so that each of the nodes in the current cluster uses its own preset subscriber program to process the received subject message. That is to say, the present application automatically establishes the message notification mechanism in the current cluster by starting the preset notification service of each node in the current cluster, and then publishes information in turn through the message publishing node and the preset publisher program of each slave node, so that each of the nodes in the current cluster uses its own preset subscriber program to process the received subject message. In this way, it is possible to effectively build a highly available message queue with very few resources without any configuration.

[0058] See also Figure 3 As shown, the embodiment of the present application also discloses a message notification device, including:

[0059] The mechanism establishment module 11 is used to automatically establish a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster;

[0060] The first message notification module 12 is used to push the subject message to be published to the preset notification service corresponding to the master node in the current cluster through the current message publishing node based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster;

[0061] The second message notification module 13 is used to push the topic message to the preset notification services of the remaining slave nodes in the current cluster through the preset publisher program of the master node itself and its own preset notification service to complete the corresponding message notification operation, so that each node in the current cluster can use its own preset subscriber program to process the received topic message.

[0062] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0063] It can be seen that the embodiment of the present application automatically establishes a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster; the current message publishing node pushes the subject message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster; the master node's own preset publisher program and its own preset notification service push the subject message to the preset notification service of the remaining slave nodes in the current cluster to complete the corresponding message notification operation, so that each of the nodes in the current cluster uses its own preset subscriber program to process the received subject message. That is to say, the present application automatically establishes a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster, and then publishes information in turn through the message publishing node and the preset publisher program of each slave node, so that each of the nodes in the current cluster uses its own preset subscriber program to process the received subject message. In this way, it is possible to effectively build a highly available message queue with very few resources without any configuration.

[0064] In some specific embodiments, the mechanism establishment module 11 may further include:

[0065] The information registration unit is used to register the address, type and specification of each node in the current cluster.

[0066] In some specific embodiments, the second message notification module 13 may specifically include:

[0067] A message push unit, configured for each node in the current cluster to push the topic message to the preset notification service corresponding to the target subscriber in itself through its own preset publisher program after searching for all target subscribers subscribed to the current topic on its own node;

[0068] A first toolkit calling unit, configured to call the software development toolkit of the preset notification service of the self through the preset subscriber program of the self;

[0069] The first message processing unit is used to process the received topic message through a socket based on the obtained software development kit.

[0070] In some specific embodiments, the message notification device may further include:

[0071] The message caching unit is used to cache the topic message after the preset notification service of each node in the current cluster receives the topic message, if the target subscriber program subscribed to the current topic is not online, until the target subscriber program comes back online.

[0072] In some specific embodiments, the message notification device may further include:

[0073] The message deleting unit is used to delete the subject message from its own cache after the message is successfully pushed or the corresponding target subscriber program has not been online for more than a preset time period.

[0074] In some specific embodiments, the first message notification module 12 may specifically include:

[0075] A second toolkit calling unit, configured for the current message publishing node to call its own software development toolkit for the preset notification service based on its own preset publisher program;

[0076] The second message processing unit is used to publish a topic message to its own preset notification service through a socket based on the obtained software development kit, so that the preset notification service pushes the topic message to the preset notification service corresponding to the master node in the current cluster.

[0077] In some specific embodiments, the message notification device may further include:

[0078] A program authentication unit, used for the preset subscriber program and the preset publisher program of each node in the current cluster to send a registration account to the notification service of the node through a socket for authentication;

[0079] The authentication failure processing subunit is used to perform corresponding registration account generation and sending operations based on its own preset notification service if the authentication fails.

[0080] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0081] Figure 4A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the message notification method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0082] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0083] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0084] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the message notification method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0085] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the message notification method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.

[0086] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0087] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0088] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0089] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0090] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A message notification method, characterized in that: include: Automatically establish a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster; The current message publishing node pushes the subject message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster; The topic message is pushed to the preset notification services of the remaining slave nodes in the current cluster through the preset publisher program of the master node itself and its own preset notification service to complete the corresponding message notification operation, so that each node in the current cluster can use its own preset subscriber program to process the received topic message.

2. The message notification method according to claim 1, characterized in that: After automatically establishing a message notification mechanism in the current cluster by starting the preset notification service of each node in the current cluster, the method further includes: The address, type and specification of each of the nodes are registered in the current cluster.

3. The message notification method according to claim 1, characterized in that: Each of the nodes in the current cluster processes the received topic message using its own preset subscriber program, including: After searching for all target subscribers subscribed to the current topic on its own node, each node in the current cluster pushes the topic message to the preset notification service corresponding to the target subscriber in itself through its own preset publisher program; Calling the software development kit of its own preset notification service through its own preset subscriber program; The received topic message is processed based on the obtained software development kit and through a socket.

4. The message notification method according to claim 3, characterized in that: Also includes: After the preset notification service of each of the nodes in the current cluster receives the topic message, if the target subscriber program subscribed to the current topic is not online, the topic message is cached until the target subscriber program comes back online.

5. The message notification method according to claim 3, characterized in that: Also includes: After the message is pushed successfully or the corresponding target subscriber program has not been online for more than a preset period of time, the subject message is deleted from its own cache.

6. The message notification method according to any one of claims 1 to 5, characterized in that: The current message publishing node pushes the subject message to be published to the preset notification service corresponding to the master node in the current cluster based on its own preset publisher program and its own preset notification service, including: The current message publishing node calls the software development kit of its own preset notification service based on its own preset publisher program; Based on the obtained software development kit, a topic message is published to the preset notification service of the same through a socket, so that the preset notification service pushes the topic message to the preset notification service corresponding to the master node in the current cluster.

7. The message notification method according to claim 6, characterized in that: Also includes: The preset subscriber program and the preset publisher program of each node in the current cluster send the registration account to the notification service of the node through socket for authentication; If the authentication fails, the corresponding registration account generation and sending operations are performed based on the preset notification service itself.

8. A message notification device, characterized in that: include: The mechanism establishment module is used to automatically establish a message notification mechanism within the current cluster by starting the preset notification service of each node in the current cluster; A first message notification module, configured to push the subject message to be published to the preset notification service corresponding to the master node in the current cluster through the current message publishing node based on its own preset publisher program and its own preset notification service; wherein the message publishing node is any node in the current cluster; The second message notification module is used to push the topic message to the preset notification services of the remaining slave nodes in the current cluster through the preset publisher program of the master node itself and its own preset notification service to complete the corresponding message notification operation, so that each of the nodes in the current cluster can use its own preset subscriber program to process the received topic message.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the message notification method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the message notification method according to any one of claims 1 to 7.