[go: up one dir, main page]

CN115834691B - Distributed publishing and subscribing method and device, electronic equipment and storage medium - Google Patents

Distributed publishing and subscribing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115834691B
CN115834691B CN202310103880.4A CN202310103880A CN115834691B CN 115834691 B CN115834691 B CN 115834691B CN 202310103880 A CN202310103880 A CN 202310103880A CN 115834691 B CN115834691 B CN 115834691B
Authority
CN
China
Prior art keywords
event
cluster
target
distributed
node
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
CN202310103880.4A
Other languages
Chinese (zh)
Other versions
CN115834691A (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.)
Meiyun Zhishu Technology Co ltd
Original Assignee
Meiyun Zhishu 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 Meiyun Zhishu Technology Co ltd filed Critical Meiyun Zhishu Technology Co ltd
Priority to CN202310103880.4A priority Critical patent/CN115834691B/en
Publication of CN115834691A publication Critical patent/CN115834691A/en
Application granted granted Critical
Publication of CN115834691B publication Critical patent/CN115834691B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention relates to the technical field of communication, and provides a distributed publishing and subscribing method, a device, electronic equipment and a storage medium, wherein the distributed publishing and subscribing method comprises the following steps: acquiring a target application event to be issued; based on a preset distributed event bus, executing a release process of releasing a target application event to each node in a cluster corresponding to the preset distributed event bus; the preset distributed event bus is used for supporting event publishing and subscribing between the target node and other nodes in the cluster. According to the invention, the mode of supporting the preset distributed event bus of the cross-server publishing and subscribing is arranged between different nodes, so that the publishing and subscribing among different nodes belonging to different servers can be ensured without modifying codes, and the reliability and stability of the system service decoupling are greatly improved on the premise of not increasing extra cost and greatly reducing the hidden danger of quality risks.

Description

Distributed publishing and subscribing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a distributed publish-subscribe method, a distributed publish-subscribe device, an electronic device, and a storage medium.
Background
With the continuous development of science and technology, the upgrading requirement of enterprise technical architecture is also developed, and the service which can be completed by the single service in the past is divided into a plurality of services according to the service field, so as to realize loose coupling, high fault tolerance and horizontal capacity expansion of the service; but aims at solving the problems that the cost is increased and the quality risk hidden trouble exists when the logic developed through event driving in the system is operated in a distributed environment; for example, when the data dictionary is updated synchronously under a plurality of nodes, although the access of the MQ middleware and the Redis center cache can be solved, when the ERP system client A is deployed, only the Redis center cache is accessed and the event-driven model development is performed in the client A based on the Redis, and when the client B is only accessed to the MQ middleware and the client B does not want to additionally deploy the Redis center cache, the code needs to be modified greatly for the client B, so that the cost is increased and the quality risk exists.
Disclosure of Invention
The present invention is directed to solving at least one of the technical problems existing in the related art. Therefore, the invention provides a distributed publishing-subscribing method, a device, an electronic device and a storage medium, and the method, the device, the electronic device and the storage medium can ensure that the publishing-subscribing is carried out among different nodes belonging to different servers without modifying codes by setting a preset distributed event bus mode for supporting the publishing-subscribing of the cross-server among different nodes, so that the reliability and the stability of the decoupling of the system business are greatly improved on the premise of not increasing extra cost and greatly reducing hidden danger of quality risks.
The invention also provides a distributed publishing and subscribing method.
The invention also provides a distributed publishing and subscribing system.
The invention also provides a distributed publishing and subscribing device.
The invention also provides a distributed publishing and subscribing device.
The invention further provides electronic equipment.
The invention also proposes a non-transitory computer readable storage medium.
According to an embodiment of the first aspect of the present invention, a distributed publish-subscribe method is applied to a target node, and includes:
acquiring a target application event to be issued;
based on a preset distributed event bus, executing a release process of releasing the target application event to each node in a cluster corresponding to the preset distributed event bus; the preset distributed event bus is used for supporting the event publishing and subscribing of the target node and other nodes in the cluster.
According to the distributed publishing and subscribing method provided by the embodiment of the invention, the target application event to be published is firstly obtained, and then the publishing process of the target application event is further executed to each node in the corresponding cluster of the preset distributed event bus based on the preset distributed event bus. Because the preset distributed event bus is used for supporting the cross-server event publishing and subscribing between the target node and other nodes, the method for supporting the cross-server publishing and subscribing between different nodes can ensure the publishing and subscribing between different nodes belonging to different servers without modifying codes by setting the preset distributed event bus between different nodes, thereby greatly improving the reliability and stability of the system service decoupling on the premise of not increasing extra cost and greatly reducing the hidden danger of quality risks.
According to an embodiment of the present invention, the executing, based on a preset distributed event bus, a publishing process of publishing the target application event to each node in a cluster corresponding to the preset distributed event bus includes:
detecting a system event for the target application event;
performing cluster event detection on the target application event based on the detection failure result of the system event;
based on the detection failure result of the cluster event and a preset distributed event bus, executing a release process of releasing the target application event to each node in the corresponding cluster of the preset distributed event bus.
According to an embodiment of the present invention, the executing, based on the failure detection result of the cluster event and a preset distributed event bus, a publishing process of publishing the target application event to each node in the corresponding cluster of the preset distributed event bus includes:
based on the detection failure result of the cluster event, carrying out conversion processing of a preset format on the target application event, and determining a target cluster event;
and based on the preset distributed event bus, issuing the target cluster event to each node in the cluster corresponding to the preset distributed event bus.
According to an embodiment of the present invention, the executing, based on the failure detection result of the cluster event and a preset distributed event bus, a publishing process of publishing the target application event to each node in the corresponding cluster of the preset distributed event bus includes:
determining a target transaction associated with the target application event;
and based on the successful submitting result of the target transaction, the detection failure result of the cluster event and the preset distributed event bus, issuing the target application event to each node in the corresponding cluster of the preset distributed event bus.
According to one embodiment of the present invention, the obtaining a target application event to be published includes:
acquiring a target event monitor, wherein the target event monitor is used for monitoring application events for different nodes in the cluster;
and acquiring the target application event monitored by the target event monitor aiming at the target node.
According to one embodiment of the present invention, the determining process of the preset distributed event bus includes:
creating an event bus aiming at a cluster environment based on a pre-configured distributed publish-subscribe protocol;
Packaging the event bus, and determining the preset distributed event bus; wherein the distributed publish-subscribe protocol includes one of a Redis-based publish-subscribe protocol, a RocketMQ-based publish-subscribe protocol, a Nacos-based publish-subscribe protocol, a ZooKeeper-based publish-subscribe protocol, and an Akka-based publish-subscribe protocol.
According to a second aspect of the present invention, a distributed publish-subscribe method is applied to at least one other node different from a target node in a cluster, and includes:
based on a preset distributed event bus, monitoring whether a broadcast event exists or not;
and executing a subscription process for the broadcast event based on the successful matching result of the monitored broadcast event and the target application event issued by the target node.
According to the distributed publishing and subscribing method, the subscribing process for the broadcast event is executed by judging that the monitored broadcast event is successfully matched with the target application event published by the target node, so that the effectiveness and reliability of the distributed subscribing event are improved.
According to one embodiment of the present invention, the performing a subscription procedure for the broadcast event based on a successful result of matching the monitored broadcast event with the target application event issued by the target node includes:
Carrying out inversion processing of a preset format on the monitored broadcast event, and determining an application event to be subscribed;
judging whether the application event to be subscribed is matched with a target application event published by the target node;
and subscribing the application event to be subscribed based on a successful matching result of the application event to be subscribed and the target application event.
An embodiment of the distributed publish-subscribe system according to the third aspect of the present invention comprises a target node and at least one other node different from the target node, the target node and the other node being communicatively connected; wherein the target node is configured to perform the method according to the first aspect, and the other nodes perform the method according to the second aspect.
According to the distributed publishing and subscribing system provided by the embodiment of the invention, a target application event to be published is firstly obtained, and then a publishing process of publishing the target application event is further executed to each node in a cluster corresponding to a preset distributed event bus based on the preset distributed event bus; and executing a subscription process for the broadcast event by determining that the monitored broadcast event successfully matches the target application event published by the target node. Because the preset distributed event bus is used for supporting the cross-server event publishing and subscribing between the target node and other nodes, the method for supporting the cross-server publishing and subscribing between different nodes can ensure the publishing and subscribing between different nodes belonging to different servers without modifying codes by setting the preset distributed event bus between different nodes, so that the effectiveness and reliability of the distributed subscribing event are improved, and the reliability and stability of system service decoupling are greatly improved on the premise of not increasing additional cost and greatly reducing quality risk hidden danger.
An embodiment of the fourth aspect of the present invention provides a distributed publish-subscribe device, including:
the acquisition module is used for acquiring a target application event to be issued;
the issuing module is used for executing the issuing process of issuing the target application event to each node in the cluster corresponding to the preset distributed event bus based on the preset distributed event bus; the preset distributed event bus is used for supporting the event publishing and subscribing of the cross-server between the target node and other nodes in the cluster.
According to the distributed publishing and subscribing device provided by the embodiment of the invention, the target application event to be published is firstly obtained, and then the publishing process of the target application event is further executed to each node in the corresponding cluster of the preset distributed event bus based on the preset distributed event bus. Because the preset distributed event bus is used for supporting the cross-server event publishing and subscribing between the target node and other nodes, the method for supporting the cross-server publishing and subscribing between different nodes can ensure the publishing and subscribing between different nodes belonging to different servers without modifying codes by setting the preset distributed event bus between different nodes, thereby greatly improving the reliability and stability of the system service decoupling on the premise of not increasing extra cost and greatly reducing the hidden danger of quality risks.
An embodiment of the fifth aspect of the present invention provides a distributed publish-subscribe device, including:
the monitoring module is used for monitoring whether a broadcast event exists or not based on a preset distributed event bus;
and the subscription module is used for executing the subscription process aiming at the target application event based on the successful matching result of the monitored broadcast event and the target application event published by the target node.
According to the distributed publishing and subscribing device provided by the embodiment of the invention, the subscribing process for the broadcast event is executed by judging that the monitored broadcast event is successfully matched with the target application event published by the target node, so that the effectiveness and reliability of the distributed subscribing event are improved.
The above technical solutions in the embodiments of the present invention have at least one of the following technical effects: firstly, acquiring a target application event to be published, and then further executing a publishing process of publishing the target application event to each node in a cluster corresponding to the preset distributed event bus based on the preset distributed event bus. Because the preset distributed event bus is used for supporting the cross-server event publishing and subscribing between the target node and other nodes, the method for supporting the cross-server publishing and subscribing between different nodes can ensure the publishing and subscribing between different nodes belonging to different servers without modifying codes by setting the preset distributed event bus between different nodes, thereby greatly improving the reliability and stability of the system service decoupling on the premise of not increasing extra cost and greatly reducing the hidden danger of quality risks.
Furthermore, the subscription process for the broadcast event is executed by judging that the monitored broadcast event is successfully matched with the target application event published by the target node, so that the effectiveness and reliability of the distributed subscription event are improved.
Furthermore, by providing a mode of supporting preset distributed event buses of various distributed protocols such as Redis, zookeeper, nacos, rocketMQ, akka and the like, the purpose of expanding the distributed capability is achieved, and the method has the characteristics of simplicity in integration, light weight, no code invasion of using notes and the like, so that other distributed middleware is not required to be relied on when cross-server publishing and subscribing is performed among different nodes in a cluster, spring event registration, publishing and subscribing can be completely compatible in a distributed environment, the method has the characteristics of light weight, no code invasion starter and startup and use, and a foundation is laid for greatly improving the reliability and stability of system service decoupling in the follow-up.
Still further, under the condition that the target application event is not a system event generated by the target node and is not a cluster event, the purpose of publishing the event across servers without modifying codes is achieved by firstly serializing the target application event and then publishing the target application event to different nodes by the cluster, so that the quality of the distributed publishing and subscribing event is ensured.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a schematic flow chart of a distributed publish-subscribe method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a Redis-based publish-subscribe protocol provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of a publish-subscribe protocol based on RocketMQ provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of a Nacos-based publish-subscribe protocol provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a publication subscription protocol based on ZooKeeper provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of an Akka-based publish-subscribe protocol provided by an embodiment of the present invention;
FIG. 7 is a second flowchart of a distributed publish-subscribe method according to an embodiment of the present invention;
FIG. 8 is a model design diagram of a distributed publish-subscribe system provided by an embodiment of the present invention;
FIG. 9 is a schematic diagram of a data interaction flow of a distributed publish-subscribe system provided by an embodiment of the present invention;
FIG. 10 is a schematic diagram of a distributed publish-subscribe device according to an embodiment of the present invention;
FIG. 11 is a second schematic diagram of a distributed publish-subscribe device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
First, the terms involved in the present invention will be defined and explained:
publish-subscribe: publish-subscribe is an event-driven programming model in which senders of messages (referred to as publishers) do not send messages directly to specific recipients (referred to as subscribers), but rather divide published messages into different categories without knowing which subscribers may exist. Likewise, subscribers may express interest in one or more categories, receiving only messages of interest, without knowing which publishers exist.
Subject matter: the topic is the attention point of the publishing and subscribing users, and when the namespaces of the two parties are consistent with the topic, the purpose of event publishing and subscribing can be achieved.
Serializing: when an event object needs to be transmitted in the network, the event object is serialized into binary bytes, and the conversion process is called serialization.
Anti-serialization: when a set of binary data is received from a network, the binary data needs to be converted into a domain-specific event object, a process called de-serialization.
The distributed publish-subscribe method, the device, the electronic equipment and the storage medium of the invention are described below with reference to fig. 1-12, wherein the distributed publish-subscribe method can be applied to a scene of lateral expansion of a plurality of nodes, and all the nodes can form a cluster; in addition, the execution body of the distributed publishing and subscribing method can be a target node in the cluster, can also be other nodes except the target node in the cluster, and the target node can be any node in the cluster. Alternatively, each node in the cluster may be a personal computer (Personal Computer, PC), a portable device, a notebook, a smart phone, a tablet, a portable wearable device, or other electronic device. The invention is not limited to the specific form of the node.
It should be noted that, the execution body of the method embodiment described below may be part or all of the above nodes. The following method embodiments are described taking an execution body as a target node in a cluster as an example.
Referring to fig. 1, a flow chart of a distributed publish-subscribe method provided by an embodiment of the present invention is shown, and an execution body of the distributed publish-subscribe method shown in fig. 1 is a target node; as shown in fig. 1, the distributed publish-subscribe method includes the following steps:
step 110, obtaining a target application event to be issued.
Specifically, the target node may acquire the target application event to be issued, which may be a system event acquired by the target node under the operations of normal power-on, power-off, sleep, end sleep, power-off and restart, abnormal power-off start, system log service switch, etc., or may be an application event generated by an application program in the target node in a client operation process, or may be an application event of cluster broadcasting. The present invention is not particularly limited herein.
Step 120, executing a release process of releasing the target application event to each node in the cluster corresponding to the preset distributed event bus based on the preset distributed event bus.
The preset distributed event bus is used for supporting the event publishing and subscribing of the cross-server between the target node and other nodes. And, the cluster corresponding to the preset distributed event bus includes a plurality of nodes, the plurality of nodes are target nodes and at least one other node different from the target nodes, and each target node can be a master node or a slave node. The number of the target nodes may be 1 or plural. And are not limited herein.
Specifically, for the obtained target application event, the target node may use a preset broadcast rule to determine whether the target application event is an event broadcast to other nodes, and in the case that it is determined that the target application event is an event broadcast to other nodes, execute a process of publishing the target application event to each node in a cluster corresponding to the preset distributed event bus through the preset distributed event bus, that is, broadcast the event of the target application event to the application event broadcaster through an application event publisher application eventmulticaster, and broadcast the target application event to each node of the cluster through an event broadcaster application eventpublicher; otherwise, in the case that it is determined that the target application event is not an event broadcast to other nodes, the publishing process of publishing the target application event may be executed without going to each node in the preset distributed event bus corresponding cluster, and the step 110 is returned to continue to acquire the target application event to be published.
It should be noted that, when an application programming interface (Application Programming Interface, API) of publichevent of the application context is called, an application event broadcaster application event multi-master to the target node may be called to each node in the preset distributed event bus corresponding cluster, and a process of publishing the target application event is executed; the API called publishEvent can be automatically called by a system of the target node; the method can also be manually called by a publisher on the target node, that is, when the publisher manually calls the API, namely publichEvent, on the target node, the event original object Object (payload) can be obtained, and then the event original object Object (payload) is packaged to obtain a packaged application event Payloadapplication event, so as to obtain the target application event to be published. The present invention is not particularly limited herein.
In addition, the target node (i.e., the event sender) sends the target application event to the preset distributed event bus, supports one or more other nodes (i.e., one or more event subscribers) to subscribe to and receive the event from the preset distributed event bus, and then processes the received event. The preset distributed event bus allows the target node and at least one other node to be not in the same server, allows different nodes to communicate with each other without mutual dependence, and achieves a decoupling purpose.
According to the distributed publishing and subscribing method provided by the invention, the target application event to be published is firstly obtained, and then the publishing process of the target application event is further executed to each node in the corresponding cluster of the preset distributed event bus based on the preset distributed event bus. Because the preset distributed event bus is used for supporting the cross-server event publishing and subscribing between the target node and other nodes, the method for supporting the cross-server publishing and subscribing between different nodes can ensure the publishing and subscribing between different nodes belonging to different servers without modifying codes by setting the preset distributed event bus between different nodes, thereby greatly improving the reliability and stability of the system service decoupling on the premise of not increasing extra cost and greatly reducing the hidden danger of quality risks.
It can be appreciated that, when the event monitor is set in the cluster, the target application event to be issued can be quickly and accurately acquired. Based on this, the specific implementation procedure of step 110 may include:
firstly, acquiring a target event monitor, wherein the target event monitor is used for monitoring application events for different nodes in a cluster; and further acquiring the target application event monitored by the target event monitor aiming at the target node.
The target event monitor may be deployed in a preset distributed event bus.
Specifically, the target node acquires the target event monitor, namely, when the Spring application is started, a refresh function is called to complete configuration and initialization work, namely, an event monitor is initialized through 'initialization EventMultimaster ()' in the refresh function, if no application event monitor with the beanName being the application EventMultimaster exists in the IOC container, a new application event monitor application EventMultimaster is built by default in a mode of creating 'SimpleApplameEventMultimaster', and a similar SmartInitialzingSingleton is realized through a calling interface, callback function callback is called for callback after the initialization of all event monitor interfaces application Listener, so that two monitors can be generated, one monitor is a method of annotating a monitor by using the monitor at EventLisEventList, and a final monitor is a method of annotating a monitor by using the monitor at the end, and a method of annotating the monitor by the monitor is packaged; the other monitor is a target event monitor meeting the preset broadcasting requirement, the target event monitor is an event monitor implementing interface application Listener statement, and the target event monitor can carry the name space of the node generating the target event monitor and the Class full Class name of the monitored application event. Therefore, in the process of starting the target event monitor to monitor the application events of all the nodes in the cluster, the target application events monitored by the target event monitor for the target nodes are obtained.
According to the distributed publishing and subscribing method, the accuracy and timeliness of the target node for acquiring the target application event are improved by acquiring the target event monitor for monitoring the application event for different nodes in the cluster and acquiring the target application event monitored by the target event monitor aiming at the target node.
It can be understood that, considering the problem that when the target application event is a system event, the target application event does not need to be issued to each node in the preset cluster corresponding to the distributed event bus, the cluster event judgment and then the issuing process can be performed for the target application event. Based on this, the specific implementation procedure of step 120 may include:
firstly, detecting a system event for a target application event; further detecting cluster events for the target application event based on the detection failure result of the system event; and then, based on the detection failure result of the cluster event and a preset distributed event bus, executing a release process of releasing the target application event to each node in the corresponding cluster of the preset distributed event bus.
Specifically, for the obtained target application event, the target node first determines whether the target application event is a system event, where the system event may be an event that characterizes that the target node is normally turned on, turned off, dormant, ends dormant, turned off and restarted by a power supply, turned off abnormally, turned on by a system log service switch, and if the target application event is determined to be a system event, the release process is not executed, and returns to step 110 to continuously obtain the target application event to be released; otherwise, if it is determined that the target application event is not a system event, it is further determined whether the target application event is a cluster event, where the cluster event may be an application event broadcast by a cluster, if it is determined that the target application event is a cluster event, the publishing process is not executed, and if it is determined that the target application event is not an event broadcast by the target node itself, the target node executes the target application event, and if it is determined that the target application event is not a system event, is not a cluster event, and is not an event broadcast by the target node itself, the step 110 returns to continue to obtain the target application event to be published. Otherwise, if it is determined that the target application event is not a system event and is not a cluster event, executing a process of publishing the target application event, that is, executing a process of broadcasting the event in a local process of the target node, to each node in the cluster corresponding to the preset distributed event bus based on the preset distributed event bus.
It should be noted that if it is determined that the target application event is not a system event and is a cluster event, it is determined whether the target application event is a wrapper event, if it is the wrapper event, the getPayload function is called to obtain a real event from the target application event, and further it is determined whether the real event obtained from the target application event is an encapsulated application event, if it is the encapsulated application event, the object strong forwarding operation is called and the getTarget method is continuously called to obtain the real event, so that the preset distributed event bus is called to perform the local publishing event and subscription event processing.
According to the distributed publishing and subscribing method provided by the invention, the publishing process of publishing the target application event to different nodes in the cluster is executed under the condition that the target application event is not a system event generated by the target node and is not a cluster event, so that the pertinence and the reliability of executing the distributed publishing event process are improved.
It will be appreciated that, when considering that the target application event is an event broadcast to other nodes, the format of the target application event needs to be converted into the format required for network transmission and then released. Based on this, based on the detection failure result of the cluster event and the preset distributed event bus, the publishing process of the publishing target application event is executed to each node in the corresponding cluster of the preset distributed event bus, and the implementation process may include:
Firstly, converting a target application event in a preset format based on a detection failure result of a cluster event, and determining the target cluster event; and further based on the preset distributed event bus, issuing a target cluster event to each node in the corresponding cluster of the preset distributed event bus.
Specifically, when the target node determines that the target application event is neither a system event nor a cluster event, the target application event can be subjected to transformation processing in a preset format, for example, an event sequencer eventsequencer is used to sequence the target application event into a target cluster event in a binary byte [ ] format so as to facilitate transmission in a network; and determining a cluster event bus from the preset distributed event bus, and issuing the target cluster event to each node in a cluster corresponding to the preset distributed event bus by calling the cluster event bus.
According to the distributed publishing and subscribing method provided by the invention, under the condition that the target application event is not a system event generated by the target node and is not a cluster event, the purpose of publishing the event across servers without modifying codes is realized by firstly serializing the target application event and then publishing the target application event to different nodes by the clusters, so that the quality of the distributed publishing and subscribing event is ensured.
It will be appreciated that in view of the effectiveness of publishing the target application event, it may be determined that the transaction associated with the target application event was successfully committed and then published. Based on the detection failure result of the cluster event and the preset distributed event bus, executing a release process of releasing the target application event to each node in the corresponding cluster of the preset distributed event bus, and the implementation process may further include:
first, determining a target transaction associated with a target application event; and further issuing a target application event to each node in the cluster corresponding to the preset distributed event bus based on the successful submitting result of the target transaction, the detection failure result of the cluster event and the preset distributed event bus.
Specifically, the target node determines a target transaction associated with the target application event, which may be determining a database transaction associated with the target application event, where the target transaction includes a transaction for modifying and/or updating data in the target application event, and when it is determined that the target transaction is submitted successfully, the target transaction associated with the target application event may be considered to be effective after processing, and then issuing the target application event to each node in the preset distributed event bus corresponding cluster is effective and reliable. For example, the data of the form a in the target application event is modified, and the target application event is released after the form a modified by the data takes effect. Otherwise, if the target transaction is not successfully committed, rollback is performed, and the target application event is discarded, so that consistency is ensured.
According to the distributed publishing and subscribing method, when the fact that the target transaction associated with the target application event is submitted successfully is determined, the publishing process of the target application event which is generated by the non-target node itself and is generated by the non-cluster event is executed to publish the system event to different nodes in the cluster, and therefore the effectiveness and reliability of publishing the target application event are improved.
It may be appreciated that, in order to support the process of event publishing and subscribing across servers between different nodes, a lightweight and multi-protocol supported preset distributed event bus may be deployed, and the process of determining the preset distributed event bus may include:
firstly, creating an event bus aiming at a cluster environment based on a pre-configured distributed publish-subscribe protocol; further packaging the event bus to determine a preset distributed event bus; the distributed publishing and subscribing protocol comprises one of a Redis-based publishing and subscribing protocol, a RocketMQ-based publishing and subscribing protocol, a Nacos-based publishing and subscribing protocol, a ZooKeeper-based publishing and subscribing protocol and an Akka-based publishing and subscribing protocol.
Specifically, based on a pre-configured distributed publish-subscribe protocol, an event bus EventBus in a cluster environment is created, and then a preset distributed event bus EventBusWrapper is obtained by packaging the event bus EventBus, wherein the preset distributed event bus EventBusWrapper has transaction coordination capability with a database, namely, after the fact that a target transaction associated with a target application event is successfully submitted, the target application event is broadcast to each node in the cluster is determined.
It should be noted that, as shown in fig. 2, for the publish-subscribe protocol of the Redis, the client includes a Lettuce client and a jesis client, the deployment mode of the Redis is divided into a single node mode, a sentinel mode and a cluster mode, and Spring Data Redis is selected to implement adaptation; in addition, the Redis-based subscription procedure is: the subscription capability of a theme (Topic) is realized through Redis MessageListener, and event monitoring of the message can be realized by binding MessageListener; the release process based on Redis is as follows: an abstract Redis connection is created through a Redis connection factory (Redis connection factory), and an event can be sent to a certain theme by calling a release method of the Redis connection.
Since the RocketMQ precursor is a high-performance distributed message middleware developed by Alibaba, the method has two modes of broadcast consumption and cluster consumption, and any node (i.e. event publisher) in the cluster can publish events by using the broadcast message of the RocketMQ, other nodes can receive the events, and a release subscription protocol based on the RocketMQ is designed based on the events, as shown in FIG. 3, the subscription process for the RocketMQ is as follows: setting a namesrvAddr (namely NameServer service address deployed by RocketMQ), a consumer group1, designating a consumption mode as MessageModel. BROADCASTING, subscribing to events issued by any node in a cluster by a registration message listener MessageListenerConcurrently, converting the received events into event objects conforming to the operation of the current node by an anti-serialization method, and calling back a preset distributed event bus to perform process-level broadcasting; the publishing process for the RocketMQ is as follows: the specific namesrvAddr and sender group2 are required to construct a defaultMQ producer Message sending object, and after the subscribed event object EventObject is deserialized, a Message object (Message) is constructed, namely the Message object can be sent to a remote Brocker Message queue to execute a release process by a release method of the defaultMQ producer; for example, when the a node publishes an event via the message sender to the body 1, the sender group2 broadcasts the message event in the topic 2 and broadcasts the event via the message receiver, so that the B node completes the event subscription and the C node completes the event subscription.
Considering that the Nacos has the capabilities of dynamic service, service monitoring, dynamic configuration and the like, a publishing and subscribing protocol based on the Nacos can be designed based on the capabilities, and as shown in fig. 4, the subscribing process for the Nacos is as follows: the configuration change event ConfigService.addListener can be monitored to increase the change monitoring capability of configuration items in the cluster, and the subscription function under the distributed environment can be completed by monitoring the configuration change event ConfigService.addListener, converting the reverse sequence format of the event and then calling back the local event bus; wherein the functions of the configservice.addlist are: when the content of the configuration item is modified on the nacos, the nacos server senses and pulls the latest content to the local and pushes the latest content through callback. The release process for Nacos is: the release configuration (ConfigService. PublishConfig) item can modify a certain configuration item, and after modification is completed, nacos internally uses all change data of listeners provided with the configuration item; the namespaces are used for data isolation, and cross influence of the publish-subscribe relationship among different applications is avoided.
Considering that the ZooKeeper is not only a distributed application coordination service of distributed and open source codes, but also an open source implementation of Chubbby of Google, which is an important component of Hadoop and Hbase, and is also software for providing consistency services for distributed applications, the provided functions include configuration maintenance, domain name service, distributed synchronization, group service and the like, based on which a publication and subscription protocol based on the ZooKeeper can be designed, as shown in FIG. 5, the subscription process for the ZooKeeper is: a node buffer (NodeCache) is built through a CurratorFramework+NodePath, a listener container (ListenContainer) is obtained through the NodeCache, then the listener container can be listened through the ListenContainer.addListener, event information is listened, and the local event bus is called back to notify all event subscribers through deserialization; the release process for the ZooKeeper is as follows: selecting a persistent node of the Zookeeper, if the persistent node does not exist, creating the node and setting node data, and if the persistent node exists, updating the node data; the listener of the current node is notified of the data change (new or modified) of the path of the publishing node.
Considering that Akka Cluster provides a fault tolerant decentralized, point-to-point based Cluster member service without single point failure or single point bottleneck due to its use of gossip protocol and automatic failure detector, and that Akka Cluster allows to build a distributed application where an application or service spans multiple nodes (actually multiple nodes), based on the fact that Akka based publish-subscribe protocol can be designed, nodes are logical members of the Cluster as shown in fig. 6, multiple nodes can be set up on the physical machine and defined by the tuple hostname: port; a cluster is a group of nodes connected together by a cluster member service; a Leader (Leader) node is a single node in the cluster that acts as a Leader to manage cluster fusion and the transition of node member states; the seed nodes are contact points for the new nodes to join the cluster, when a new node is started, the new node sends a message to all the seed nodes, and then sends a joining command to the seed node which is answered first; the seed node configuration value has no effect on the running cluster itself, and is only relevant to the nodes newly joining the cluster, because it can help the nodes newly joining the cluster find a contact point to send a joining command; the node newly joining the cluster may send a join command to any one of the current members of the cluster, not just the seed node.
It should be noted that, the preset distributed event bus not only supports the Redis, zooKeeper, nacos and RocketMQ distributed publish-subscribe protocols, uses no difference after abstraction, but also supports the Akka protocol, and does not need other middleware for decentralization. Further, the preset distributed event bus may be determined by a manner of carrying kafka by a ZooKeeper, may be determined by a manner of configuring Redis by a Nacos, and may be determined by a manner of managing Redis by a ZooKeeper. The protocols involved in determining the preset distributed event bus are not particularly limited at this time. Thereby improving the flexibility, diversity and reliability of determining the preset distributed event bus.
The distributed publishing and subscribing method provided by the invention not only realizes the purpose of expanding the distributed capability by providing the preset distributed event buses supporting a plurality of distributed protocols such as Redis, zookeeper, nacos, rocketMQ, akka and the like, but also has the characteristics of simplicity in integration, light weight, no code invasion in use and the like, so that other distributed middleware is not required to be relied on when cross-server publishing and subscribing is carried out between different nodes in a cluster, spring event registration, publishing and subscribing can be completely compatible in a distributed environment, the characteristics of light weight, no code invasion of a starter and starting and using are provided, and a foundation is laid for greatly improving the reliability and stability of system service decoupling in the follow-up.
Referring to fig. 7, a flow chart of a distributed publish-subscribe method provided by the present invention is shown, and an execution subject of the distributed publish-subscribe method shown in fig. 7 is at least one other node different from a target node in a cluster; as shown in fig. 7, the distributed publish-subscribe method includes the following steps:
step 710, based on the preset distributed event bus, monitoring whether there is a broadcast event.
Step 720, executing a subscription process for the broadcast event based on the successful matching result of the monitored broadcast event and the target application event issued by the target node.
Specifically, when other nodes in the cluster find that a broadcast event exists by using a target event monitor of a preset distributed event bus, further judging whether a release node of the monitored broadcast event is a target node, if the release node of the monitored broadcast event is determined to be the target node, determining that the monitored broadcast event is successfully matched with a target application event released by the target node, and at the moment, executing a subscription process aiming at the monitored broadcast event; otherwise, the subscription procedure is not performed.
According to the distributed publishing and subscribing method, the subscribing process aiming at the broadcast event is executed by judging that the monitored broadcast event is successfully matched with the target application event published by the target node, so that the effectiveness and reliability of the distributed subscribing event are improved.
It can be understood that, considering that the format of the event monitored by other nodes in the cluster is the format conforming to the network transmission, the monitored event can be subjected to format inversion processing first, and then whether to subscribe or not can be judged. Based on this, the specific implementation procedure of step 720 may include:
firstly, carrying out inversion processing of a preset format on monitored broadcast events, and determining application events to be subscribed; further judging whether the application event to be subscribed is matched with the target application event issued by the target node; and then subscribing the application event to be subscribed based on a successful matching result of the application event to be subscribed and the target application event.
Specifically, for the monitored broadcast event, other nodes in the cluster firstly perform inverse conversion processing of a preset format on the monitored broadcast event, for example, perform inverse sequence conversion on the broadcast event of a binary byte [ ] format to obtain an application event to be subscribed, and then further call an invokeListeners callback monitor to process the application event to be subscribed, in the callback process, firstly judge whether the application event to be subscribed is an event broadcast by other nodes (each application event to be subscribed is marked with a node publishing source), and if the application event to be subscribed is an event broadcast by other nodes, not subscribe and directly skip; otherwise, if the application event to be subscribed is not an event broadcasted by other nodes, the onEvent of the callback EventListener carries out event processing.
According to the distributed publishing and subscribing method, the monitored broadcast event is subjected to inversion processing of the preset format, and then the application event to be subscribed is subscribed when the application event to be subscribed obtained through the inversion processing is successfully matched with the target application event, so that the flexibility and the accuracy of distributed subscription are improved.
Referring to fig. 8, a schematic diagram of a data interaction flow of the distributed publish-subscribe system shown in fig. 9 is constructed based on the schematic diagram shown in fig. 8, where the distributed publish-subscribe system includes a target node and at least one other node except the target node in a cluster, the target node is in communication connection with the other nodes, the target node executes the method of using the execution subject as the target node in the foregoing embodiment, and the other nodes execute the method of using the execution subject as the other nodes in the foregoing embodiment, as shown in fig. 9. And will not be described in detail herein.
Referring to fig. 10, a schematic structural diagram of a distributed publish-subscribe device provided by the present invention, as shown in fig. 10, the distributed publish-subscribe device 1000 includes:
an obtaining module 1010, configured to obtain a target application event to be published;
The publishing module 1020 is configured to execute a publishing process of publishing the target application event to each node in the cluster corresponding to the preset distributed event bus based on the preset distributed event bus; the preset distributed event bus is used for supporting event publishing and subscribing between the target node and other nodes in the cluster.
It may be appreciated that the acquiring module 1010 may be specifically configured to acquire a target event listener, where the target event listener is configured to listen for application events for different nodes in the cluster; and acquiring a target application event which is monitored by the target event monitor aiming at the target node.
It is appreciated that the publishing module 1020 may be specifically configured to perform system event detection on the target application event; performing cluster event detection on the target application event based on the detection failure result of the system event; based on the detection failure result of the cluster event and the preset distributed event bus, executing the release process of releasing the target application event to each node in the corresponding cluster of the preset distributed event bus.
It may be appreciated that the publishing module 1020 may be specifically configured to perform a conversion process in a preset format on the target application event based on a detection failure result of the cluster event, so as to determine the target cluster event; and based on a preset distributed event bus, issuing the target cluster event to each node in a cluster corresponding to the preset distributed event bus.
It is appreciated that the publish module 1020 may be further operable to determine a target transaction associated with a target application event; and issuing a target application event to each node in a cluster corresponding to the preset distributed event bus based on a successful submitting result of the target transaction, a detection failure result of the cluster event and the preset distributed event bus.
It may be appreciated that the determining process of the preset distributed event bus in the publishing module 1020 includes: creating an event bus aiming at a cluster environment based on a pre-configured distributed publish-subscribe protocol; packaging the event bus, and determining a preset distributed event bus; the distributed publishing and subscribing protocol comprises one of a Redis-based publishing and subscribing protocol, a RocketMQ-based publishing and subscribing protocol, a Nacos-based publishing and subscribing protocol, a ZooKeeper-based publishing and subscribing protocol and an Akka-based publishing and subscribing protocol.
Referring to fig. 11, a schematic structural diagram of a distributed publish-subscribe device provided by the present invention, as shown in fig. 11, the distributed publish-subscribe device 1100 includes:
a monitor module 1110, configured to monitor whether a broadcast event exists based on a preset distributed event bus;
The subscription module 1120 is configured to execute a subscription procedure for the broadcast event based on a successful result of matching the monitored broadcast event with the target application event published by the target node.
It can be appreciated that the subscription module 1120 may be specifically configured to perform inversion processing of a preset format on the monitored broadcast event, and determine an application event to be subscribed; judging whether the application event to be subscribed is matched with a target application event published by a target node; and subscribing the application event to be subscribed based on a successful matching result of the application event to be subscribed and the target application event.
Fig. 12 illustrates a physical structure diagram of an electronic device, as shown in fig. 12, which may include: processor 1210, communication interface (Communications Interface), 1220, memory 1230 and communication bus 1240, wherein processor 1210, communication interface 1220 and memory 1230 communicate with each other via communication bus 1240. Processor 1210 may call logic instructions in memory 1230 to perform the following method:
acquiring a target application event to be issued;
based on a preset distributed event bus, executing a release process of releasing a target application event to each node in a cluster corresponding to the preset distributed event bus; the preset distributed event bus is used for supporting event publishing and subscribing between the target node and other nodes in the cluster. And/or the number of the groups of groups,
Based on a preset distributed event bus, monitoring whether a broadcast event exists or not;
and executing the subscription process aiming at the broadcast event based on the successful matching result of the monitored broadcast event and the target application event published by the target node.
In addition, the logic instructions in the memory 1230 described above may be implemented in the form of software functional units and sold or used as a stand-alone product, stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the related art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present invention disclose a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example comprising:
acquiring a target application event to be issued;
based on a preset distributed event bus, executing a release process of releasing a target application event to each node in a cluster corresponding to the preset distributed event bus; the preset distributed event bus is used for supporting event publishing and subscribing between the target node and other nodes in the cluster. And/or the number of the groups of groups,
based on a preset distributed event bus, monitoring whether a broadcast event exists or not;
and executing the subscription process aiming at the broadcast event based on the successful matching result of the monitored broadcast event and the target application event published by the target node.
In yet another aspect, embodiments of the present invention further provide a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the transmission method provided in the above embodiments, for example, including:
Acquiring a target application event to be issued;
based on a preset distributed event bus, executing a release process of releasing a target application event to each node in a cluster corresponding to the preset distributed event bus; the preset distributed event bus is used for supporting event publishing and subscribing between the target node and other nodes in the cluster. And/or the number of the groups of groups,
based on a preset distributed event bus, monitoring whether a broadcast event exists or not;
and executing the subscription process aiming at the broadcast event based on the successful matching result of the monitored broadcast event and the target application event published by the target node.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that the above-mentioned embodiments are merely illustrative of the invention, and not limiting. While the invention has been described in detail with reference to the embodiments, those skilled in the art will appreciate that various combinations, modifications, or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and it is intended to be covered by the scope of the claims of the present invention.

Claims (12)

1. A distributed publish-subscribe method, applied to a target node, comprising:
Acquiring a target application event to be issued;
detecting a system event for the target application event;
performing cluster event detection on the target application event based on the detection failure result of the system event;
executing a release process of releasing the target application event to each node in the cluster corresponding to the preset distributed event bus based on the detection failure result of the cluster event and the preset distributed event bus; the preset distributed event bus is used for supporting the event publishing and subscribing of the target node and other nodes in the cluster.
2. The distributed publish-subscribe method according to claim 1, wherein the executing the publishing process of the target application event to each node in the corresponding cluster of the preset distributed event bus based on the detection failure result of the cluster event and the preset distributed event bus includes:
based on the detection failure result of the cluster event, carrying out conversion processing of a preset format on the target application event, and determining a target cluster event;
and based on the preset distributed event bus, issuing the target cluster event to each node in the cluster corresponding to the preset distributed event bus.
3. The distributed publish-subscribe method according to claim 1, wherein the executing the publishing process of the target application event to each node in the corresponding cluster of the preset distributed event bus based on the detection failure result of the cluster event and the preset distributed event bus includes:
determining a target transaction associated with the target application event;
and based on the successful submitting result of the target transaction, the detection failure result of the cluster event and the preset distributed event bus, issuing the target application event to each node in the corresponding cluster of the preset distributed event bus.
4. A distributed publish-subscribe method according to any of claims 1 to 3, wherein said obtaining a target application event to be published comprises:
acquiring a target event monitor, wherein the target event monitor is used for monitoring application events for different nodes in the cluster;
and acquiring the target application event monitored by the target event monitor aiming at the target node.
5. A distributed publish-subscribe method according to any of claims 1 to 3, wherein said determining of said preset distributed event bus comprises:
Creating an event bus aiming at a cluster environment based on a pre-configured distributed publish-subscribe protocol;
packaging the event bus, and determining the preset distributed event bus; wherein the distributed publish-subscribe protocol includes one of a Redis-based publish-subscribe protocol, a RocketMQ-based publish-subscribe protocol, a Nacos-based publish-subscribe protocol, a ZooKeeper-based publish-subscribe protocol, and an Akka-based publish-subscribe protocol.
6. A distributed publish-subscribe method, applied to at least one other node in a cluster than a target node, comprising:
based on a preset distributed event bus, monitoring whether a broadcast event exists or not;
based on the successful matching result of the monitored broadcast event and the target application event issued by the target node, executing a subscription process for the broadcast event;
the target node is used for acquiring a target application event to be issued, detecting a system event of the target application event, and detecting a cluster event of the target application event based on a detection failure result of the system event; executing a release process of releasing the target application event to each node in the corresponding cluster of the preset distributed event bus based on the detection failure result of the cluster event and the preset distributed event bus; the preset distributed event bus is used for supporting the event publishing and subscribing between the target node and other nodes in the cluster.
7. The distributed publish and subscribe method of claim 6, wherein said performing a subscription procedure for said broadcast event based on successful matching of said monitored broadcast event to a target application event published by said target node comprises:
carrying out inversion processing of a preset format on the monitored broadcast event, and determining an application event to be subscribed;
judging whether the application event to be subscribed is matched with a target application event published by the target node;
and subscribing the application event to be subscribed based on a successful matching result of the application event to be subscribed and the target application event.
8. A distributed publish-subscribe system comprising a target node and at least one other node different from the target node, the target node and the other node being communicatively connected; wherein the target node is adapted to perform the method of any of the preceding claims 1 to 5, and the other node is adapted to perform the method of any of the preceding claims 6 or 7.
9. A distributed publish-subscribe device, comprising:
the acquisition module is used for acquiring a target application event to be issued;
The release module is used for detecting the system event of the target application event; performing cluster event detection on the target application event based on the detection failure result of the system event; executing a release process of releasing the target application event to each node in the cluster corresponding to the preset distributed event bus based on the detection failure result of the cluster event and the preset distributed event bus; the preset distributed event bus is used for supporting the event publishing and subscribing of the cross-server between the target node and other nodes in the cluster.
10. A distributed publish-subscribe device, comprising:
the monitoring module is used for monitoring whether a broadcast event exists or not based on a preset distributed event bus;
the subscription module is used for executing a subscription process aiming at the target application event based on the successful matching result of the monitored broadcast event and the target application event published by the target node;
the target node is used for acquiring a target application event to be issued, detecting a system event of the target application event, and detecting a cluster event of the target application event based on a detection failure result of the system event; executing a release process of releasing the target application event to each node in the corresponding cluster of the preset distributed event bus based on the detection failure result of the cluster event and the preset distributed event bus; the preset distributed event bus is used for supporting the event publishing and subscribing between the target node and other nodes in the cluster.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the distributed publish-subscribe method of any of claims 1 to 7 when the program is executed by the processor.
12. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the distributed publish-subscribe method of any of claims 1 to 7.
CN202310103880.4A 2023-02-13 2023-02-13 Distributed publishing and subscribing method and device, electronic equipment and storage medium Active CN115834691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310103880.4A CN115834691B (en) 2023-02-13 2023-02-13 Distributed publishing and subscribing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310103880.4A CN115834691B (en) 2023-02-13 2023-02-13 Distributed publishing and subscribing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115834691A CN115834691A (en) 2023-03-21
CN115834691B true CN115834691B (en) 2023-06-30

Family

ID=85521044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310103880.4A Active CN115834691B (en) 2023-02-13 2023-02-13 Distributed publishing and subscribing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115834691B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584555A (en) * 2022-03-08 2022-06-03 浪潮云信息技术股份公司 Global event distribution method and system in distributed cloud scene

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078440A1 (en) * 2002-05-01 2004-04-22 Tim Potter High availability event topic
WO2004107216A2 (en) * 2003-05-23 2004-12-09 Computer Associates Think, Inc. A publish/subscribe mechanism for web services
CN102664947B (en) * 2012-04-18 2015-11-04 迈普通信技术股份有限公司 Notice distribution method in distributed system
CN115022318B (en) * 2022-05-30 2023-08-29 在线途游(北京)科技有限公司 Message publishing method and system based on micro-service architecture
CN114938392B (en) * 2022-06-23 2023-06-30 成都质数斯达克科技有限公司 Distributed subscription and release system and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584555A (en) * 2022-03-08 2022-06-03 浪潮云信息技术股份公司 Global event distribution method and system in distributed cloud scene

Also Published As

Publication number Publication date
CN115834691A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN102333029B (en) Routing method in server cluster system
CN107590072B (en) Application development and test method and device
US9880982B2 (en) System and method for rendering presentation pages based on locality
US20210176310A1 (en) Data synchronization method and system
US20180367610A1 (en) Data storage method and server applicable to distributed server cluster
US8606859B2 (en) Method and system to communicate messages in a computer network
US20040078440A1 (en) High availability event topic
CN107395729A (en) A kind of consumption system of message queue, method and device
CN111090699A (en) Method and device for synchronizing service data, storage medium, and electronic device
JP2010170567A (en) Apparatus and associated method for facilitating delivery and processing of push content
CN102981911B (en) Distributed message handling system and device and method thereof
CN101315609A (en) Apparatus and method for implementing communication between components of single process
CN112527520A (en) Method and device for deploying message middleware
CN112527523B (en) Distributed message delivery method and system for high performance computing multi-cloud
CN111064626A (en) Configuration updating method, device, server and readable storage medium
CN111770029A (en) Dynamic queue forwarding method, system and storage medium based on RabbitMQ and ActiveMQ
CN101917394A (en) Middleware system and working method for data sharing on mobile devices
US8725856B2 (en) Discovery of network services
CN106899605B (en) Communication method and device based on STOMP protocol
US20070005744A1 (en) System and method to establish a peer-to-peer IT backbone
CN116319732A (en) Message queue centralized configuration management system and method based on RabbitMQ
CN115834691B (en) Distributed publishing and subscribing method and device, electronic equipment and storage medium
CN110209986A (en) Internal storage state method of data synchronization and device
US20070038746A1 (en) Event management methods and systems
CN104052723A (en) Information processing method and server

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