CN111711663A - Processing method and device for publishing and subscribing services and electronic equipment - Google Patents

Processing method and device for publishing and subscribing services and electronic equipment Download PDF

Info

Publication number
CN111711663A
CN111711663A CN202010455250.XA CN202010455250A CN111711663A CN 111711663 A CN111711663 A CN 111711663A CN 202010455250 A CN202010455250 A CN 202010455250A CN 111711663 A CN111711663 A CN 111711663A
Authority
CN
China
Prior art keywords
message
proxy server
name
proxy
published
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.)
Pending
Application number
CN202010455250.XA
Other languages
Chinese (zh)
Inventor
胡佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010455250.XA priority Critical patent/CN111711663A/en
Publication of CN111711663A publication Critical patent/CN111711663A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services

Abstract

The embodiment of the disclosure discloses a processing method and device for publishing and subscribing services, electronic equipment and a computer-readable storage medium, and relates to the field of cloud computing. The method is executed by one proxy server in a proxy server cluster, the proxy server cluster comprises a plurality of proxy servers, and the plurality of proxy servers are respectively connected with the same intermediate server, and the method comprises the following steps: receiving a first publishing message of a predetermined topic published by a publisher client; sending first synchronization information containing a first publishing message to an intermediate server for the intermediate server to send the first synchronization information to a plurality of proxy servers of a proxy server cluster, wherein the first synchronization information contains: the first publishing information, the name of the topic corresponding to the first publishing information and the name of the proxy server. The embodiment of the disclosure can realize the sharing of the published message of the client among the multi-agent servers.

Description

Processing method and device for publishing and subscribing services and electronic equipment
Technical Field
The present application relates to the field of publish and subscribe technologies, and in particular, to a method and an apparatus for processing a publish and subscribe service, an electronic device, and a computer-readable storage medium.
Background
Publish and subscribe are a messaging paradigm in which a sender of a Message, i.e., a publisher, does not send the Message directly to a particular recipient, i.e., a subscriber, but rather through a central communication point, such as a Message Queue Telemetry Transport (MQTT) agent. The MQTT broker is responsible for scheduling all messages between publishers and legitimate subscribers.
As shown in fig. 1, fig. 1 is a diagram of a proxy server communication architecture of an existing publish and subscribe service, where each publisher client publishing a message to the proxy server includes a topic in the message, where the topic is routing information of the proxy server. Each subscriber client that wants to receive a message subscribes to a certain topic and the broker service delivers all messages with matching subscribed topics to the subscriber clients.
In order to ensure the reliability of the MQTT proxy, the current common method is that a server side of the MQTT proxy monitors all proxy servers by means of heartbeat check and the like, and specifies that the only available proxy server provides unified service to the outside, namely, a single proxy server is used for providing service. However, when the current proxy server fails, all connected client devices are disconnected, and the server needs to reallocate the available proxy servers for the client to connect.
The existing means of providing services to the outside by using multiple proxy servers exists, so that although more clients can be served, messages among the proxy servers are not intercommunicated, and when two clients which are subscribed and subscribed are distributed in different proxy servers, a subscriber cannot receive the messages sent by a publisher, so that the messages are lost. Meanwhile, the client is distributed in different nodes, so that unified management and operation and maintenance are difficult to perform.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method and an apparatus for processing publish and subscribe services, an electronic device, and a computer-readable storage medium, so as to implement synchronization of published messages of a client between multiple proxy servers.
According to a first aspect of the embodiments of the present disclosure, a method for processing publish and subscribe services is provided, where the method is performed by a proxy server in a proxy server cluster, where the proxy server cluster includes a plurality of proxy servers, and the plurality of proxy servers are respectively connected to a same intermediate server, and the method includes:
receiving a first publishing message of a predetermined topic published by a publisher client;
sending first synchronization information containing the first publishing message to the intermediate server for the intermediate server to send the first synchronization information to a plurality of proxy servers of the proxy server cluster, wherein the first synchronization information contains: the first publishing message, the name of the topic corresponding to the first publishing message and the name of the proxy server.
Optionally, after receiving the first publish message of the predetermined topic published by the publisher client, the method further comprises:
searching a subscriber client subscribing the topic corresponding to the published message on the proxy server; and
and sending the publishing message to the subscriber client.
Optionally, the method further comprises:
receiving second synchronization information sent by the intermediate server, wherein the second synchronization information is sent to the intermediate server by another proxy server of the proxy server cluster, and the second synchronization information includes: the second published message, the name of the corresponding subject of the second published message and the name of a proxy server publishing the second published message;
and sending the second published message to a subscriber client subscribing to the topic corresponding to the second published message.
Optionally, before sending the second published message to the subscriber client subscribing to the topic corresponding to the published message, the method further includes:
acquiring the name of the proxy server which issues the second issuing message in the second synchronization information;
determining whether the name of the proxy server issuing the second issuing message is the same as the name of the proxy server;
under the condition that the name of the proxy server which issues the second issuing message is determined to be different from the name of the proxy server, acquiring the name of the theme corresponding to the second issuing message in the second synchronous information;
searching a subscriber who subscribes to the topic corresponding to the second published message;
and executing the operation of sending the second published message to the subscriber client subscribing to the topic corresponding to the second published message.
Optionally, the method further comprises:
and under the condition that the name of the proxy server which issues the second issued message is determined to be the same as the name of the proxy server, not processing the second issued message.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for processing publish and subscribe services, where the method is performed by an intermediate server, and the intermediate server is connected to a plurality of proxy servers of a proxy server cluster, respectively, and the method includes:
receiving synchronous information sent by a proxy server, wherein the synchronous information comprises a published message, a name of a subject corresponding to the published message and a name of the proxy server publishing the message;
and sending the received synchronous information to all or part of the proxy servers in the plurality of proxy servers, so that all or part of the proxy servers send the published information contained in the synchronous information to a subscriber client subscribing the topic corresponding to the published information, wherein the subscriber client subscribes the information to at least one proxy server.
Optionally, before the sending the received synchronization information to all or part of the plurality of proxy servers, the method further includes:
receiving a confirmation request of selecting the message synchronization service sent by a proxy server;
recording the name of the proxy server of the selected message synchronization service;
the sending the received synchronization information to all or some of the plurality of proxy servers comprises:
and sending the synchronous information to each proxy server selecting the message synchronous service according to the record of the name of the proxy server selecting the message synchronous service.
According to a third aspect of the embodiments of the present disclosure, there is provided a device for processing publish and subscribe services, the device being executed on a proxy server in a proxy server cluster, the proxy server cluster including a plurality of proxy servers, the plurality of proxy servers being respectively connected to a same intermediate server, the device including:
the first receiving module is used for receiving a first publishing message of a preset theme published by a publisher client;
a first sending module, configured to send first synchronization information including the first distribution message to the intermediate server, so that the intermediate server sends the first synchronization information to a plurality of proxy servers of the proxy server cluster, where the first synchronization information includes: the first publishing message, the name of the topic corresponding to the first publishing message and the name of the proxy server.
Optionally, the apparatus further includes a subscription message sending module, configured to:
searching a subscriber client subscribing the topic corresponding to the published message on the proxy server; and
and sending the publishing message to the subscriber client.
Optionally, the apparatus further comprises:
a second receiving module, configured to receive second synchronization information sent by the intermediate server, where the second synchronization information is sent to the intermediate server by another proxy server of the proxy server cluster, and the second synchronization information includes: the second published message, the name of the corresponding subject of the second published message and the name of a proxy server publishing the second published message;
and the second sending module is used for sending the second published message to a subscriber client subscribing to the topic corresponding to the second published message.
Optionally, the apparatus further comprises a detection module, the detection module comprising:
an obtaining unit, configured to obtain a name of the proxy server that issues the second issue message in the second synchronization information;
a determining unit, configured to determine whether a name of the proxy server that issues the second issue message is the same as a self name;
the first processing unit is configured to, when it is determined that the name of the proxy server that issues the second publish message is different from the name of the proxy server, obtain a name of a topic corresponding to the second publish message in the second synchronization information; searching a subscriber who subscribes to the topic corresponding to the second published message; and executing the operation of sending the second published message to the subscriber client subscribing to the topic corresponding to the second published message.
Optionally, the detection module further includes:
and the second processing unit is used for not processing the second release message under the condition that the name of the proxy server which releases the second release message is determined to be the same as the name of the proxy server.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a device for processing publish and subscribe services, the device being executed on an intermediate server, the intermediate server being respectively connected to a plurality of proxy servers of a proxy server cluster, the device including:
the receiving module is used for receiving synchronous information sent by a proxy server, wherein the synchronous information comprises a published message, a name of a subject corresponding to the published message and a name of the proxy server publishing the message;
and the sending module is used for sending the received synchronous information to all or part of the proxy servers in the plurality of proxy servers so that all or part of the proxy servers can send the published information contained in the synchronous information to a subscriber client subscribing the topic corresponding to the published information, wherein the subscriber client subscribes the information to at least one proxy server.
Optionally, the apparatus further comprises a message synchronization module, and the message synchronization module includes:
a receiving unit for receiving a confirmation request of selecting message synchronization service sent by a proxy server;
the recording unit is used for recording the name of the proxy server of the selected message synchronization service;
the sending module is further configured to:
and sending the synchronous information to each proxy server selecting the message synchronous service according to the record of the name of the proxy server selecting the message synchronous service.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:
the processing apparatus according to the third aspect or the fourth aspect of the embodiment of the present disclosure; alternatively, the first and second electrodes may be,
a processor and a memory for storing executable instructions for controlling the processor to perform the processing method described according to the first or second aspect of an embodiment of the disclosure.
According to a sixth aspect of the embodiments of the present disclosure, there is also provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the processing method described according to the first or second aspect of the embodiments of the present disclosure.
According to the embodiment of the disclosure, the message synchronization theme is subscribed on the message middleware through the plurality of proxy servers, the message published on the message synchronization theme by the client is sent to the message middleware, and the message middleware further sends the published message to each proxy server subscribed to the message synchronization theme, so that the published message of the client is synchronized among the plurality of proxy servers. Thus, each proxy server can receive the published message of the client and send the published message to the subscribing client which subscribes the topic corresponding to the published message corresponding to the proxy server. Therefore, the multi-agent server can serve more clients, and the published messages of the clients can be synchronized among the multi-agent servers. Even if two clients with the relationship of subscription and subscribed are distributed in different proxy servers, the subscriber can receive the message sent by the publisher without data loss, so that the problem of node communication in the cluster in the existing scheme can be solved.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the embodiments of the disclosure.
FIG. 1 is a diagram of a prior art proxy communication architecture for publish and subscribe services.
Fig. 2 is a block diagram of a hardware configuration of an electronic device that can be used to implement an embodiment of the disclosure.
Fig. 3 is a diagram of a proxy server cluster communication architecture for publish and subscribe services according to an embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating a processing method of a publish and subscribe service according to a first embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating a processing method of a publish and subscribe service according to a second embodiment of the present disclosure.
Fig. 6 is a flowchart of an application example of a processing method of a publish and subscribe service according to an embodiment of the present disclosure.
Fig. 7 is a block diagram illustrating a processing apparatus for publish and subscribe services according to a first embodiment of the present disclosure.
Fig. 8 is a block diagram illustrating a processing apparatus for a publish and subscribe service according to a second embodiment of the present disclosure.
Fig. 9 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of parts and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the embodiments of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments of the disclosure, their application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< implementation Environment and hardware configuration >
Fig. 2 is a block diagram showing a hardware configuration of an electronic apparatus 1000 that can implement an embodiment of the present disclosure.
The electronic device 1000 may be a desktop computer, a server device, or the like.
The server device may be a unitary server or a distributed server across multiple computers or computer data centers. The server may be of various types, such as, but not limited to, a node device of a content distribution network, a storage server of a distributed storage system, a cloud database server, a cloud computing server, a cloud management server, a web server, a news server, a mail server, a message server, an advertisement server, a file server, an application server, an interaction server, a storage server, a database server, a proxy server, or the like. In some embodiments, each server may include hardware, software, or embedded logic components or a combination of two or more such components for performing the appropriate functions supported or implemented by the server. For example, a server, such as a blade server, a cloud server, etc., or may be a server group consisting of a plurality of servers, which may include one or more of the above types of servers, etc.
As shown in fig. 2, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, or may further include a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, or the like. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, or the like, for executing a computer program. The computer program may be written in an instruction set of an architecture such as x86, Arm, RISC, MIPS, SSE, etc. The communication device 1400 is capable of wired communication using an optical fiber or a cable, or wireless communication, for example, and may specifically include WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, and the like. The display device 1500 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. A user can input/output voice information through the speaker 1700 and the microphone 1800.
The electronic device shown in fig. 2 is merely illustrative and is in no way intended to limit the embodiments of the disclosure, their application, or uses. In an embodiment of the present disclosure, the memory 1200 of the electronic device 1000 is configured to store instructions for controlling the processor 1100 to operate so as to execute any one of the publishing and subscribing services processing methods provided by the embodiment of the present disclosure. It should be understood by those skilled in the art that although a plurality of means are shown for the electronic device 1000 in fig. 2, embodiments of the present disclosure may only refer to some of the means therein, for example, the electronic device 1000 may only refer to the processor 1100 and the storage 1200. The skilled person can design the instructions according to the disclosed embodiments of the present disclosure. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
< application scenarios >
First, an application scenario of a processing method of a publish and subscribe service according to an embodiment of the present disclosure is described with reference to fig. 3, where fig. 3 is a diagram of a proxy server cluster communication architecture of a publish and subscribe service according to an embodiment of the present disclosure.
As shown in fig. 3, the proxy server cluster in this embodiment includes a plurality of proxy servers, such as a proxy server 1, a proxy server 2, a proxy server 3, and a proxy server 4, and the publishing and subscribing service processing method in this embodiment of the disclosure may be implemented on any one of the proxy servers included in the proxy server cluster.
In the example of fig. 3, proxy servers 1, 3 correspond to clients a and B of the publisher, and proxy servers 2, 4 correspond to clients C and D of the subscriber. The client A, B may connect to the corresponding node in the proxy cluster, i.e. proxy 1, 3, through Load Balance (LB), wherein the connected proxy 1, 3 maintains a connection session and keeps a heartbeat with the client A, B, and keeps the connection smooth through a heartbeat instruction.
Likewise, the client C, D is connected to the corresponding node in the proxy cluster, i.e., proxy 2, 4, through Load Balancing (LB), and the connected proxy 2, 4 maintains a connection session with the client C, D maintaining a heartbeat.
The plurality of servers 1, 2, 3, 4 are respectively connected to an intermediate server, which may be a message middleware. In one example, whether the message is posted by the client to the proxy server or the message is posted by the proxy server to the intermediate server, a JSON (JavaScript Object Notation, JavaScript interpreted or just-in-time compiled programming language) standard format is used to facilitate message processing by the recipient.
In the following, description will be made on a method, an apparatus, and an electronic device for processing a publish and subscribe service according to embodiments of the present disclosure.
< method embodiment I >
First, in an embodiment of the present disclosure, a method for processing a publish and subscribe service is provided, as shown in fig. 4, fig. 4 is a flowchart illustrating steps of a method for processing a publish and subscribe service according to a first embodiment of the present disclosure. The method may be implemented by an electronic device or a system of multiple electronic devices, which may be, for example, electronic device 1000 as shown in fig. 1.
In this embodiment, the method for processing the publish and subscribe services is executed by a proxy server in a proxy server cluster, where the proxy server cluster includes a plurality of proxy servers, and the plurality of proxy servers are respectively connected to the same intermediate server.
The processing method of the publishing and subscribing service comprises the following steps:
step 102, receiving a first publishing message of a predetermined topic published by a publisher client.
In a topic-based publish and subscribe service, a first publish message of a publisher is published onto a topic channel. A subscriber will receive all messages on the topic to which it subscribes and all subscribers subscribing to the same topic will receive the same message.
Here, after a publisher publishes a message of a predetermined topic on a corresponding client, a proxy server providing a publication service thereto will receive the first publication message from the publisher client.
Step 104, sending first synchronization information containing the first distribution message to an intermediate server, so that the intermediate server sends the first synchronization information to a plurality of proxy servers of a proxy server cluster, wherein the first synchronization information contains: the first publishing information, the name of the topic corresponding to the first publishing information and the name of the proxy server.
In one embodiment, the intermediate Server may be a message middleware that may use Remote Dictionary service (Redis), high throughput distributed publish-subscribe messaging system (Kafka), message oriented middleware (RabbitMq), or other distributed message middleware.
The first synchronization information comprises the first publish message received by the proxy server in step 102 in order to synchronize the first publish message published on the proxy server to the intermediate server. The first publish message contained in the first synchronization information sent to the intermediate server is not limited to the topic type of publication, nor to which publisher it originated from. First distribution messages distributed by different distributors on different types of topics of the proxy server can be sent to the intermediate server.
The first synchronization information includes, in addition to the first distribution message, a name of a topic corresponding to the first distribution message, and a name of a proxy server that sends the first synchronization information to the intermediate server, that is, a name of the proxy server itself that receives the first distribution message.
Taking fig. 3 as an example, for example, a client a sends a message with content { "msg": Hello "} to a topic/test/topic of a proxy server 1, and after receiving a first publishing message" { "msg": Hello "}" of the topic "/test/topic" issued by the publisher client a to the proxy server 1, the proxy server 1 sends first synchronization information to an intermediate server, where the format is, for example, as follows:
Figure BDA0002509118040000101
wherein, the broker-1 in the first synchronization information represents the proxy server 1; "brooker 1" corresponding to the node indicates the name of the node sending the first synchronization information, i.e. the name of the proxy server 1; "test" corresponding to topic represents the name of the topic corresponding to the first publish message which is published to the proxy server 1 by the client A; the "Hello" for msg indicates the content of the first publish message that client a published to proxy server 1.
In this manner, the proxy server may synchronize the first publish message published on its topic to the intermediate server for the intermediate server to perform subsequent operations, as will be described below.
After receiving the first distribution message at step 102, in addition to synchronizing the first distribution message to the intermediate server, the proxy server also pushes the first distribution message for the subscribers who subscribe to the predetermined topic on the proxy server according to the first distribution message.
Optionally, in an embodiment, after receiving the first publish message of the predetermined topic published by the publisher client, the method further includes: searching a subscriber who subscribes the topic corresponding to the first publishing message on the proxy server; and sending the first publish message to the subscriber client.
The subscriber registers and subscribes to the topic on the proxy server, so that the proxy server can provide the subscriber with the publishing and subscribing service based on the subscribed topic.
Once there is a first published message published to the subscription topic, the subscriber will receive all its messages on the subscription topic of the proxy server according to the message push of the proxy server.
After receiving a first publishing message published on a topic, the proxy server searches a subscriber subscribing to the topic corresponding to the first publishing message, and sends the first publishing message to a client of the subscriber when the subscriber subscribing to the topic exists. If the query does not have a subscriber to the topic, the first publish message is not processed. However, whether the current proxy server queries the subscriber who subscribes to the topic, the proxy server will send the synchronization information containing the first publish message to the intermediate server after receiving the first publish message from the publisher.
In the above embodiment, the proxy server may send the first publish message published on the predetermined topic to the intermediate server in the form of the first synchronization information, and the proxy server may also receive the first synchronization information sent by the intermediate server.
Optionally, in an embodiment, the method further includes: receiving second synchronization information sent by the intermediate server, wherein the second synchronization information is sent to the intermediate server by a proxy server of the proxy server cluster, and the second synchronization information includes: the second published message, the name of the corresponding subject of the second published message and the name of a proxy server publishing the second message; and sending the second published message to a subscriber client subscribing to the topic corresponding to the published message.
The content format of the second synchronization information received by the proxy server from the intermediate server may be the same as the content format of the first synchronization information sent by the proxy server to the intermediate server, for example, the second synchronization information includes the first (second) publish message, the subject name corresponding to the first (second) publish message, and the name of the proxy server. Of course, for the current proxy server, the name of the proxy server in the first synchronization information sent to the intermediate server is the name of the current proxy server itself; and the proxy server name in the received second synchronization information of the intermediate server is the name of the proxy server sending the second synchronization information.
Through the embodiment, the current proxy server can not only push the first publishing message published on the topic of the proxy server to the subscriber client corresponding to the topic, but also push the second publishing message published on the topic of other proxy servers to the subscriber client subscribing the topic on the proxy server through the intermediate server.
The second synchronization information received by the current proxy server from the intermediate server may be from all or a portion of the proxy servers connected to the intermediate server. When the intermediate server sends the synchronization information to each proxy server, it does not distinguish whether the sent synchronization information is the same as the proxy server which is sent synchronously again, that is, after receiving the synchronization information sent by the proxy server, the intermediate server sends the synchronization information to the proxy server connected with the intermediate server, and certainly, the intermediate server may also include the current proxy server itself.
In this way, the current proxy server receives the first (second) synchronization information sent to the intermediate server by itself again. After receiving the published message published on the topic, the current proxy server searches the subscribers subscribing to the topic corresponding to the published message, and sends the published message to the client of the subscriber when the subscribers corresponding to the topic exist. At this time, after the current proxy server receives the synchronization information sent to the intermediate server before the current proxy server receives the synchronization information again, in order to avoid sending the published information contained in the synchronization information to the subscriber who has received the published information again, it is necessary to determine whether the synchronization information is sent by itself.
Optionally, in an embodiment, before sending the second published message to the subscriber client subscribing to the topic corresponding to the second published message, the method further includes: acquiring the name of the proxy server which issues the second message in the second synchronous information; determining whether the name of the proxy server issuing the second message is the same as the name of the proxy server; under the condition that the name of the proxy server which publishes the second message is determined to be different from the name of the proxy server, the name of the subject corresponding to the second published message in the second synchronous information is obtained; searching a subscriber who subscribes to the topic corresponding to the second published message on the proxy server; and executing the operation of sending the second published message to the subscriber client subscribing to the topic corresponding to the second published message.
The method further comprises the following steps: not processing the second published message if it is determined that the name of the proxy server publishing the second message is the same as the name of the proxy server.
According to the embodiment, for the synchronous information which is judged not to be sent to the intermediate server, the proxy server searches whether a subscriber who subscribes the topic exists on the synchronous information according to the topic name corresponding to the published message in the synchronous information. As described above, the proxy server executes the corresponding push operation of the release message according to the search result, which is not described herein again.
And if the received synchronization information sent by the intermediate server is judged to be the synchronization information sent to the intermediate server by the proxy server, the proxy server does not process the received synchronization information.
< method example two >
In another embodiment of the present disclosure, a method for processing a publish and subscribe service is provided, as shown in fig. 5, fig. 5 is a flowchart illustrating steps of a method for processing a publish and subscribe service according to a second embodiment of the present disclosure. The method may be implemented by an electronic device or a system of multiple electronic devices, which may be, for example, electronic device 1000 as shown in fig. 1.
In this embodiment, the method for processing the publish and subscribe services is executed by an intermediate server, and the intermediate server is connected to a plurality of proxy servers of a proxy server cluster respectively.
As shown in fig. 5, the processing method of the publish and subscribe service includes the following steps:
step 112, receiving synchronous information sent by a proxy server, where the synchronous information includes a published message, a name of a topic corresponding to the published message, and a name of the proxy server publishing the message.
As described above, the intermediary server may be a message middleware. The synchronization information received by the intermediate server may come from a proxy server in the proxy server cluster, which may be the proxy server of the first embodiment described above.
Step 114, sending the received synchronization information to all or part of the proxy servers in the plurality of proxy servers, so that the plurality of proxy servers send the published information contained in the synchronization information to a subscriber client subscribing to a topic corresponding to the published information, wherein the subscriber client subscribes to information from at least one proxy server.
The intermediate server sends the received synchronization information to a predetermined proxy server, and the proxy server capable of receiving the synchronization information sent by the intermediate server can establish synchronization information transmission with the intermediate server according to a predetermined protocol, so that the intermediate server sends the synchronization information to the proxy server after receiving the synchronization information.
Optionally, in an embodiment, before the sending the received synchronization information to all or part of the plurality of proxy servers, the method further includes: receiving a confirmation request of selecting the message synchronization service sent by a proxy server; recording the name of the proxy server of the selected message synchronization service; the sending the received synchronization information to all or some of the plurality of proxy servers comprises: and sending the synchronous information to each proxy server selecting the message synchronous service according to the record of the name of the proxy server selecting the message synchronous service.
In one embodiment, each proxy server and the intermediate server may establish a synchronization information transmission, for example, in the form of a publish-and-subscribe service, where the proxy server may subscribe as a subscriber to a message synchronization topic on the intermediate server, and the topic is used for pushing a synchronization message sent by the proxy server. If a proxy server in the proxy server cluster subscribes to the message synchronization topic on the intermediate server, the intermediate server will push the synchronization information to the subscribing proxy server subscribing to the topic after receiving the synchronization information sent by any proxy server in the proxy server cluster. That is, the proxy server may be considered a subscriber and the intermediate server may be considered a proxy server.
In one embodiment, the proxy server may also send the synchronization information to the intermediate server in the form of a publish and subscribe service, where the proxy server may serve as a publisher to publish the synchronization information on the message synchronization topic on the intermediate server, thereby sending the synchronization information to the intermediate server. That is, the proxy server may be considered a publisher and the intermediate server may be considered a proxy server.
At this time, the confirmation request sent by the proxy server to select the message synchronization service may be that the proxy server subscribes to the message synchronization topic on the intermediate server.
< example >
Next, a description will be made of a processing method of a publish and subscribe service according to an embodiment of the present disclosure, with reference to a specific example.
Referring now to fig. 6, fig. 6 is a flowchart illustrating an exemplary method of processing a publish and subscribe service according to an embodiment of the present disclosure.
As shown in the figure, the processing method of the publish and subscribe service in this embodiment includes the following steps:
step 302, a cluster of proxy servers is started, wherein each proxy server of the cluster of proxy servers is connected to an intermediate server after being started.
The reason for the proxy server to establish a connection with the intermediate server at startup is that the proxy server needs to maintain a long link with the message middleware to ensure that the subscriber client can receive the new message at the first time when the new message is sent out. If the connection is acquired at a fixed interval, for example, 1 second, the connection is reestablished and the proxy server can receive the new message after 1 second if the new message comes in when the connection is just disconnected, and meanwhile, compared with the time consumed for sending the message from the intermediate server to the proxy server, the time consumed for reestablishing the connection is longer, and calculation and network resources are wasted when the connection is continuously and repeatedly established, so that the proxy server establishes the connection with the intermediate server when being started and keeps the connection smooth through a heartbeat instruction.
Step 304, the proxy server establishes synchronous information transmission with the intermediate server on the intermediate server in a mode of subscribing the message synchronous theme;
step 306, the client initiates a proxy server connection; here, the client may be either a publisher client or a subscriber client.
Step 308, connecting the client to a certain proxy server in the proxy server cluster through load balancing distribution;
the connected proxy server establishes a connection with the client and maintains a connection session to keep a heartbeat with the client, step 310.
In step 312, after the client connects, the client may register with the proxy server and subscribe to the topic, and the subscription relationship is maintained by the current proxy server. In this step, the client is a subscriber client and receives the relevant message of the subscription topic sent by the proxy server.
In step 314, the client sends the publish message to the specified topic of the current proxy server. In this step, the client is a publisher client, and publishes a message to a corresponding topic on the proxy server.
Step 316, after receiving the publish message from the publisher, the current proxy server locally searches whether there is a subscriber subscribing to the topic in its own proxy server, and if so, the current proxy server sends the publish message to the subscriber client.
Step 318, after receiving the publishing message of the publisher, the current proxy server pushes the synchronization information including the publishing message, the topic name corresponding to the publishing message and the name of the current proxy server to the message synchronization topic of the intermediate server. The synchronization information is pushed by the intermediate server to the proxy server on which the message synchronization topic is subscribed. Here, as long as the current proxy server also subscribes to the message synchronization topic, the current proxy server is also included in the other proxy servers.
In step 320, the proxy server subscribing the message synchronization topic on the intermediate server receives the synchronization information sent by the intermediate server.
Step 322, the proxy server receiving the synchronization information parses the synchronization information, and determines whether its own proxy server name is the same as the name of the proxy server issuing the message included in the synchronization information.
Step 324, if the names are different, searching the subscriber who subscribes the topic corresponding to the published message on the proxy server, and sending the published message to the subscriber client.
In step 326, if the names are the same, the process ends and no further processing is performed.
According to the embodiment of the disclosure, the received published message published on the predetermined topic by the publisher is sent to the intermediate server by the proxy server of the proxy server cluster, and the intermediate server further sends the published message to other proxy servers, so that the published message of the client is synchronized and shared among a plurality of proxy servers. Thus, each proxy server can receive the published message of the client and send the published message to the subscriber who subscribes the topic corresponding to the published message on the proxy server.
Therefore, not only can a plurality of proxy servers serve more clients, but also the subscriber can receive the message published by the publisher under the condition that two clients subscribing and subscribed are distributed in different proxy servers, and the published message cannot be lost.
In addition, even if the clients subscribing and subscribed to the service are distributed in different proxy servers, the unified management and operation and maintenance of the clients and the proxy servers can be realized through the publishing and subscribing service processing method of the embodiment of the disclosure.
In one embodiment, the synchronization information data may be lightweight data, for example, transmitted using JSON formatted data, and thus have less resource consumption. In addition, the embodiment of the disclosure provides services by using multiple proxy servers of the proxy server cluster, has the advantage of strong client connection carrying capacity, and can support large-scale device access and realize distributed message subscription.
According to the embodiment of the disclosure, a single proxy node can provide connection and message publishing and subscribing services for clients with a number of more than 10 ten thousand, for example, and can provide a client service capability with a number of 10 ten thousand × N when the number of proxy server nodes of the proxy cluster is N. And the proxy server is stably connected with the client equipment, and has extremely high data reliability.
< first embodiment of the apparatus >
In another embodiment of the present disclosure, a processing apparatus 2000 for a publish and subscribe service is further provided, as shown in fig. 7, fig. 7 is a block diagram illustrating a structure of the processing apparatus for a publish and subscribe service according to an embodiment of the present disclosure.
In this embodiment, the processing device 2000 executes a proxy server side in a proxy server cluster, where the proxy server cluster includes a plurality of proxy servers, and the plurality of proxy servers are respectively connected to the same intermediate server.
As shown in fig. 7, the processing device 2000 includes:
the first receiving module 2200 is configured to receive a first publishing message of a predetermined topic published by the publisher client.
A first sending module 2400, configured to send first synchronization information including the first distribution message to the intermediate server, so that the intermediate server sends the first synchronization information to a plurality of proxy servers of the proxy server cluster, where the first synchronization information includes: the first publishing message, the name of the topic corresponding to the first publishing message and the name of the proxy server.
In one embodiment, the apparatus further comprises a subscription messaging module to: searching a subscriber client subscribing the topic corresponding to the published message on the proxy server; and sending the publish message to the subscriber client.
In one embodiment, the apparatus further comprises: a second receiving module, configured to receive second synchronization information sent by the intermediate server, where the second synchronization information is sent to the intermediate server by another proxy server of the proxy server cluster, and the second synchronization information includes: the second published message, the name of the corresponding subject of the second published message and the name of a proxy server publishing the second published message;
and the second sending module is used for sending the second published message to a subscriber client subscribing to the topic corresponding to the second published message.
In one embodiment, the apparatus further comprises a detection module comprising: an obtaining unit, configured to obtain a name of the proxy server that issues the second issue message in the second synchronization information; a determining unit, configured to determine whether a name of the proxy server that issues the second issue message is the same as a self name; the first processing unit is configured to, when it is determined that the name of the proxy server that issues the second publish message is different from the name of the proxy server, obtain a name of a topic corresponding to the second publish message in the second synchronization information; searching a subscriber who subscribes to the topic corresponding to the second published message; and executing the operation of sending the second published message to the subscriber client subscribing to the topic corresponding to the second published message.
In one embodiment, the detection module further comprises: and the second processing unit is used for not processing the second release message under the condition that the name of the proxy server which releases the second release message is determined to be the same as the name of the proxy server.
< example II of the apparatus >
In another embodiment of the present disclosure, a processing device 3000 for a publish and subscribe service is further provided, as shown in fig. 8, and fig. 8 is a block diagram illustrating a structure of the processing device for the publish and subscribe service according to the second embodiment of the present disclosure.
In this embodiment, the processing device 3000 is implemented on the intermediate server side, and the intermediate server is respectively connected with a plurality of proxy servers of a proxy server cluster.
As shown in fig. 8, the processing apparatus 3000 includes:
the receiving module 3200 is configured to receive synchronization information sent by a proxy server, where the synchronization information includes a publish message, a name of a topic corresponding to the publish message, and a name of the proxy server that publishes the message.
A sending module 3400, configured to send the received synchronization information to all or part of the proxy servers in the plurality of proxy servers, so that all or part of the proxy servers send published information included in the synchronization information to a subscriber client subscribing to a topic corresponding to the published information, where the subscriber client subscribes information to at least one proxy server.
In one embodiment, the processing device 3000 further comprises a message synchronization module, which comprises: a receiving unit for receiving a confirmation request of selecting message synchronization service sent by a proxy server; and the recording unit is used for recording the name of the proxy server of the selected message synchronization service. The sending module is further configured to: and sending the synchronous information to each proxy server selecting the message synchronous service according to the record of the name of the proxy server selecting the message synchronous service.
< electronic device embodiment >
According to still another embodiment of the present disclosure, there is also provided an electronic apparatus, and the electronic apparatus 4000 may be the electronic apparatus 1000 shown in fig. 1. Fig. 9 is a block diagram of an electronic device according to an embodiment of the present disclosure.
In one aspect, the electronic device 4000 may include the processing apparatus for publishing and subscribing services, which is configured to implement the processing method for publishing and subscribing services according to any embodiment of the disclosure.
On the other hand, as shown in fig. 9, the electronic device 4000 may include a memory 4200 and a processor 4400, the memory 4200 being configured to store executable instructions; the instruction is used to control the processor 4400 to execute the processing method of the publish and subscribe service.
In this embodiment, the electronic device 4000 may be any electronic product having the memory 4200 and the processor 4400, such as a tablet computer, a handheld computer, a desktop computer, a notebook computer, a workstation, a game console, a server, and the like.
< computer-readable storage Medium embodiment >
Finally, according to yet another embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of processing a publish and subscribe service according to any embodiment of the present disclosure.
The disclosed embodiments may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement aspects of embodiments of the disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations for embodiments of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the disclosed embodiments by personalizing the custom electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of the computer-readable program instructions.
Various aspects of embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the embodiments of the present disclosure is defined by the appended claims.

Claims (16)

1. A method for processing publish and subscribe services, wherein the method is executed by a proxy server in a proxy server cluster, the proxy server cluster comprises a plurality of proxy servers, and the plurality of proxy servers are respectively connected with a same intermediate server, the method comprises:
receiving a first publishing message of a predetermined topic published by a publisher client;
sending first synchronization information containing the first publishing message to the intermediate server for the intermediate server to send the first synchronization information to a plurality of proxy servers of the proxy server cluster, wherein the first synchronization information contains: the first publishing message, the name of the topic corresponding to the first publishing message and the name of the proxy server.
2. The method of claim 1, wherein after receiving a first post message of a predetermined topic posted by a publisher client, the method further comprises:
searching a subscriber client subscribing the topic corresponding to the published message on the proxy server; and
and sending the publishing message to the subscriber client.
3. The method of claim 1, further comprising:
receiving second synchronization information sent by the intermediate server, wherein the second synchronization information is sent to the intermediate server by another proxy server of the proxy server cluster, and the second synchronization information includes: the second published message, the name of the corresponding subject of the second published message and the name of a proxy server publishing the second published message;
and sending the second published message to a subscriber client subscribing to the topic corresponding to the second published message.
4. The method of claim 3, wherein prior to sending the second published message to a subscriber client subscribing to the topic corresponding to the published message, the method further comprises:
acquiring the name of the proxy server which issues the second issuing message in the second synchronization information;
determining whether the name of the proxy server issuing the second issuing message is the same as the name of the proxy server;
under the condition that the name of the proxy server which issues the second issuing message is determined to be different from the name of the proxy server, acquiring the name of the theme corresponding to the second issuing message in the second synchronous information;
searching a subscriber who subscribes to the topic corresponding to the second published message;
and executing the operation of sending the second published message to the subscriber client subscribing to the topic corresponding to the second published message.
5. The method of claim 4, further comprising:
and under the condition that the name of the proxy server which issues the second issued message is determined to be the same as the name of the proxy server, not processing the second issued message.
6. A method for processing publish and subscribe services, the method being performed by an intermediate server, the intermediate server being connected to a plurality of proxy servers of a proxy server cluster, respectively, the method comprising:
receiving synchronous information sent by a proxy server, wherein the synchronous information comprises a published message, a name of a subject corresponding to the published message and a name of the proxy server publishing the message;
and sending the received synchronous information to all or part of the proxy servers in the plurality of proxy servers, so that all or part of the proxy servers send the published information contained in the synchronous information to a subscriber client subscribing the topic corresponding to the published information, wherein the subscriber client subscribes the information to at least one proxy server.
7. The method of claim 6, wherein prior to said sending the received synchronization information to all or some of the plurality of proxy servers, the method further comprises:
receiving a confirmation request of selecting the message synchronization service sent by a proxy server;
recording the name of the proxy server of the selected message synchronization service;
the sending the received synchronization information to all or some of the plurality of proxy servers comprises:
and sending the synchronous information to each proxy server selecting the message synchronous service according to the record of the name of the proxy server selecting the message synchronous service.
8. A device for processing publish and subscribe services, the device being implemented in a proxy server of a proxy server cluster, the proxy server cluster including a plurality of proxy servers, the plurality of proxy servers being respectively connected to a same intermediate server, the device comprising:
the first receiving module is used for receiving a first publishing message of a preset theme published by a publisher client;
a first sending module, configured to send first synchronization information including the first distribution message to the intermediate server, so that the intermediate server sends the first synchronization information to a plurality of proxy servers of the proxy server cluster, where the first synchronization information includes: the first publishing message, the name of the topic corresponding to the first publishing message and the name of the proxy server.
9. The apparatus of claim 8, further comprising a subscription messaging module configured to:
searching a subscriber client subscribing the topic corresponding to the published message on the proxy server; and
and sending the publishing message to the subscriber client.
10. The apparatus of claim 8, further comprising:
a second receiving module, configured to receive second synchronization information sent by the intermediate server, where the second synchronization information is sent to the intermediate server by another proxy server of the proxy server cluster, and the second synchronization information includes: the second published message, the name of the corresponding subject of the second published message and the name of a proxy server publishing the second published message;
and the second sending module is used for sending the second published message to a subscriber client subscribing to the topic corresponding to the second published message.
11. The apparatus of claim 10, further comprising a detection module, the detection module comprising:
an obtaining unit, configured to obtain a name of the proxy server that issues the second issue message in the second synchronization information;
a determining unit, configured to determine whether a name of the proxy server that issues the second issue message is the same as a self name;
the first processing unit is configured to, when it is determined that the name of the proxy server that issues the second publish message is different from the name of the proxy server, obtain a name of a topic corresponding to the second publish message in the second synchronization information; searching a subscriber who subscribes to the topic corresponding to the second published message; and executing the operation of sending the second published message to the subscriber client subscribing to the topic corresponding to the second published message.
12. The apparatus of claim 4, wherein the detection module further comprises:
and the second processing unit is used for not processing the second release message under the condition that the name of the proxy server which releases the second release message is determined to be the same as the name of the proxy server.
13. An apparatus for processing publish and subscribe services, the apparatus being implemented in an intermediate server, the intermediate server being respectively connected to a plurality of proxy servers of a proxy server cluster, the apparatus comprising:
the receiving module is used for receiving synchronous information sent by a proxy server, wherein the synchronous information comprises a published message, a name of a subject corresponding to the published message and a name of the proxy server publishing the message;
and the sending module is used for sending the received synchronous information to all or part of the proxy servers in the plurality of proxy servers so that all or part of the proxy servers can send the published information contained in the synchronous information to a subscriber client subscribing the topic corresponding to the published information, wherein the subscriber client subscribes the information to at least one proxy server.
14. The apparatus of claim 13, further comprising a message synchronization module, the message synchronization module comprising:
a receiving unit for receiving a confirmation request of selecting message synchronization service sent by a proxy server;
the recording unit is used for recording the name of the proxy server of the selected message synchronization service;
the sending module is further configured to:
and sending the synchronous information to each proxy server selecting the message synchronous service according to the record of the name of the proxy server selecting the message synchronous service.
15. An electronic device, comprising:
the processing apparatus according to any one of claims 8 to 14; alternatively, the first and second electrodes may be,
a processor and a memory for storing executable instructions for controlling the processor to perform a processing method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, realizes the processing method according to any one of claims 1 to 7.
CN202010455250.XA 2020-05-26 2020-05-26 Processing method and device for publishing and subscribing services and electronic equipment Pending CN111711663A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010455250.XA CN111711663A (en) 2020-05-26 2020-05-26 Processing method and device for publishing and subscribing services and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010455250.XA CN111711663A (en) 2020-05-26 2020-05-26 Processing method and device for publishing and subscribing services and electronic equipment

Publications (1)

Publication Number Publication Date
CN111711663A true CN111711663A (en) 2020-09-25

Family

ID=72538578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010455250.XA Pending CN111711663A (en) 2020-05-26 2020-05-26 Processing method and device for publishing and subscribing services and electronic equipment

Country Status (1)

Country Link
CN (1) CN111711663A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291224A (en) * 2020-10-23 2021-01-29 上海淇玥信息技术有限公司 Real-time communication interaction method and device and electronic equipment
CN113014672A (en) * 2021-04-07 2021-06-22 广州趣丸网络科技有限公司 Message pushing method and device, electronic equipment and storage medium
CN113259423A (en) * 2021-04-26 2021-08-13 南京苏宁软件技术有限公司 Method and device for client networking access in P2P system
CN113347074A (en) * 2021-04-09 2021-09-03 成都中科创达软件有限公司 Theme determination method, related method, device and system
CN113590785A (en) * 2021-07-29 2021-11-02 百度在线网络技术(北京)有限公司 Message reply method and device, electronic equipment and storage medium
CN113726896A (en) * 2021-09-01 2021-11-30 看屋(上海)信息科技有限公司 Task distribution system based on commercial intelligent real estate industry
CN114025002A (en) * 2021-11-05 2022-02-08 深圳市宏电技术股份有限公司 MQTT information transmission method, system and communication equipment
CN114172837A (en) * 2021-12-16 2022-03-11 中国建设银行股份有限公司 Information sharing method, device, apparatus, system, storage medium, and program product
CN114338063A (en) * 2020-09-29 2022-04-12 中移物联网有限公司 Message queue system, service processing method, and computer-readable storage medium
CN114679472A (en) * 2022-03-01 2022-06-28 达闼机器人股份有限公司 Communication system, method, apparatus, storage medium, and electronic device
CN114827071A (en) * 2022-03-29 2022-07-29 中国人民解放军军事科学院战争研究院 Cross-service area message interaction method based on information directory
CN115242805A (en) * 2022-06-11 2022-10-25 北京网聚云联科技有限公司 Gossip-based distributed MQTT message transmission method, transmission system and storage medium
CN116055555A (en) * 2023-01-28 2023-05-02 深圳市明源云科技有限公司 Proxy server setting method, proxy server setting device, electronic equipment and readable storage medium
CN117560415A (en) * 2024-01-11 2024-02-13 德阳城市智慧之心信息技术有限公司 Asynchronous and synchronous communication method and system for smart community micro-service architecture (MQTT)
CN115242805B (en) * 2022-06-11 2024-04-19 北京网聚云联科技有限公司 Distributed MQTT message transmission method, transmission system and storage medium based on gossip

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
CN104079614A (en) * 2013-03-29 2014-10-01 国际商业机器公司 Method and system for orderly obtaining messages of distributed publishing subscription system
CN105553682A (en) * 2015-12-23 2016-05-04 华为技术有限公司 Event notification method and event notification system
CN105871959A (en) * 2015-01-22 2016-08-17 阿里巴巴集团控股有限公司 Message delivery method, system and device
CN106230896A (en) * 2016-07-18 2016-12-14 深圳国泰安教育技术股份有限公司 A kind of information push method, Apparatus and system
CN106953901A (en) * 2017-03-10 2017-07-14 重庆邮电大学 A kind of trunked communication system and its method for improving message transmission performance
CN107231400A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 The synchronous method and device of a kind of data
CN109286648A (en) * 2017-07-21 2019-01-29 比亚迪股份有限公司 Data push method, device, system and terminal device
CN109302435A (en) * 2017-07-25 2019-02-01 腾讯科技(深圳)有限公司 Message issuance method, device, system, server and computer readable storage medium
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
CN110209986A (en) * 2019-06-06 2019-09-06 海尔优家智能科技(北京)有限公司 Internal storage state method of data synchronization and device
CN110336736A (en) * 2019-05-27 2019-10-15 四川长虹电器股份有限公司 The shared method subscribed to is realized based on MQTT server cluster
CN110661871A (en) * 2019-09-27 2020-01-07 宁波和利时智能科技有限公司 Data transmission method and MQTT server
CN110730118A (en) * 2019-09-24 2020-01-24 北京真视通科技股份有限公司 Message sending method, device, computer equipment and storage medium
CN110928704A (en) * 2018-09-20 2020-03-27 广州虎牙信息科技有限公司 Message processing method, message processing system, server, and computer storage medium
CN111131426A (en) * 2019-12-19 2020-05-08 浙江百应科技有限公司 MQTT data interaction based method, terminal and server
CN111131501A (en) * 2019-12-31 2020-05-08 郑州信大捷安信息技术股份有限公司 MQTT protocol-based message pushing system and method

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
CN104079614A (en) * 2013-03-29 2014-10-01 国际商业机器公司 Method and system for orderly obtaining messages of distributed publishing subscription system
CN105871959A (en) * 2015-01-22 2016-08-17 阿里巴巴集团控股有限公司 Message delivery method, system and device
CN105553682A (en) * 2015-12-23 2016-05-04 华为技术有限公司 Event notification method and event notification system
CN107231400A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 The synchronous method and device of a kind of data
CN106230896A (en) * 2016-07-18 2016-12-14 深圳国泰安教育技术股份有限公司 A kind of information push method, Apparatus and system
CN106953901A (en) * 2017-03-10 2017-07-14 重庆邮电大学 A kind of trunked communication system and its method for improving message transmission performance
CN109286648A (en) * 2017-07-21 2019-01-29 比亚迪股份有限公司 Data push method, device, system and terminal device
CN109302435A (en) * 2017-07-25 2019-02-01 腾讯科技(深圳)有限公司 Message issuance method, device, system, server and computer readable storage medium
CN110928704A (en) * 2018-09-20 2020-03-27 广州虎牙信息科技有限公司 Message processing method, message processing system, server, and computer storage medium
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
CN110336736A (en) * 2019-05-27 2019-10-15 四川长虹电器股份有限公司 The shared method subscribed to is realized based on MQTT server cluster
CN110209986A (en) * 2019-06-06 2019-09-06 海尔优家智能科技(北京)有限公司 Internal storage state method of data synchronization and device
CN110730118A (en) * 2019-09-24 2020-01-24 北京真视通科技股份有限公司 Message sending method, device, computer equipment and storage medium
CN110661871A (en) * 2019-09-27 2020-01-07 宁波和利时智能科技有限公司 Data transmission method and MQTT server
CN111131426A (en) * 2019-12-19 2020-05-08 浙江百应科技有限公司 MQTT data interaction based method, terminal and server
CN111131501A (en) * 2019-12-31 2020-05-08 郑州信大捷安信息技术股份有限公司 MQTT protocol-based message pushing system and method

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338063A (en) * 2020-09-29 2022-04-12 中移物联网有限公司 Message queue system, service processing method, and computer-readable storage medium
CN114338063B (en) * 2020-09-29 2023-11-10 中移物联网有限公司 Message queue system, service processing method and computer readable storage medium
CN112291224B (en) * 2020-10-23 2023-11-24 上海淇玥信息技术有限公司 Interaction method and device for real-time communication and electronic equipment
CN112291224A (en) * 2020-10-23 2021-01-29 上海淇玥信息技术有限公司 Real-time communication interaction method and device and electronic equipment
CN113014672A (en) * 2021-04-07 2021-06-22 广州趣丸网络科技有限公司 Message pushing method and device, electronic equipment and storage medium
CN113014672B (en) * 2021-04-07 2022-05-17 广州趣丸网络科技有限公司 Message pushing method and device, electronic equipment and storage medium
CN113347074A (en) * 2021-04-09 2021-09-03 成都中科创达软件有限公司 Theme determination method, related method, device and system
CN113259423A (en) * 2021-04-26 2021-08-13 南京苏宁软件技术有限公司 Method and device for client networking access in P2P system
CN113259423B (en) * 2021-04-26 2022-10-04 南京苏宁软件技术有限公司 Method and device for client networking access in P2P system
CN113590785A (en) * 2021-07-29 2021-11-02 百度在线网络技术(北京)有限公司 Message reply method and device, electronic equipment and storage medium
CN113726896A (en) * 2021-09-01 2021-11-30 看屋(上海)信息科技有限公司 Task distribution system based on commercial intelligent real estate industry
CN113726896B (en) * 2021-09-01 2022-09-27 看屋(上海)信息科技有限公司 Task distribution system based on commercial intelligent real estate industry
CN114025002A (en) * 2021-11-05 2022-02-08 深圳市宏电技术股份有限公司 MQTT information transmission method, system and communication equipment
CN114172837A (en) * 2021-12-16 2022-03-11 中国建设银行股份有限公司 Information sharing method, device, apparatus, system, storage medium, and program product
CN114679472A (en) * 2022-03-01 2022-06-28 达闼机器人股份有限公司 Communication system, method, apparatus, storage medium, and electronic device
CN114827071A (en) * 2022-03-29 2022-07-29 中国人民解放军军事科学院战争研究院 Cross-service area message interaction method based on information directory
CN115242805A (en) * 2022-06-11 2022-10-25 北京网聚云联科技有限公司 Gossip-based distributed MQTT message transmission method, transmission system and storage medium
CN115242805B (en) * 2022-06-11 2024-04-19 北京网聚云联科技有限公司 Distributed MQTT message transmission method, transmission system and storage medium based on gossip
CN116055555A (en) * 2023-01-28 2023-05-02 深圳市明源云科技有限公司 Proxy server setting method, proxy server setting device, electronic equipment and readable storage medium
CN116055555B (en) * 2023-01-28 2023-08-04 深圳市明源云科技有限公司 Proxy server setting method, proxy server setting device, electronic equipment and readable storage medium
CN117560415A (en) * 2024-01-11 2024-02-13 德阳城市智慧之心信息技术有限公司 Asynchronous and synchronous communication method and system for smart community micro-service architecture (MQTT)
CN117560415B (en) * 2024-01-11 2024-03-22 德阳城市智慧之心信息技术有限公司 Asynchronous and synchronous communication method and system for smart community micro-service architecture (MQTT)

Similar Documents

Publication Publication Date Title
CN111711663A (en) Processing method and device for publishing and subscribing services and electronic equipment
EP2972937B1 (en) Providing an unseen message count across devices
RU2670794C9 (en) Method and system for forming flexible node on local or distributed computing systems
KR20110076954A (en) Optimized polling in low resource devices
CN109995801B (en) Message transmission method and device
CN110612716B (en) Intermediate device for network routing of data messages
CN112311656B (en) Message aggregation and display method and device, electronic equipment and computer readable medium
US20220377040A1 (en) Session message display method, electronic device and storage medium
CN110781373B (en) List updating method and device, readable medium and electronic equipment
JP2023523228A (en) Information interaction method, device, server, system and storage medium
CA2604902C (en) System and method for enabling group subscription for asynchronous push-based applications on a wireless device
CN106899605B (en) Communication method and device based on STOMP protocol
CN112084042B (en) Message processing method and device
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN112291325A (en) Message processing method and device and computer system
CN112367241A (en) Message generation and message transmission method, device, equipment and computer readable medium
CN114979241A (en) Communication method, communication apparatus, storage medium, and electronic device
CN112929453B (en) Method and device for sharing session data
CN112269770B (en) Document sharing method, device and system and electronic equipment
CN110661857B (en) Data synchronization method and device
CN112306984A (en) Data source routing method and device
Ivan A web based Publish-Subscribe framework for mobile computing
KR102367017B1 (en) Communication network system and control method thereof
CN112565173B (en) Method and apparatus for message processing
US11777878B1 (en) Message routing based on unavailability

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200925

RJ01 Rejection of invention patent application after publication