CN112395114B - Method, computing device, and computer-readable storage medium for processing messages - Google Patents

Method, computing device, and computer-readable storage medium for processing messages Download PDF

Info

Publication number
CN112395114B
CN112395114B CN202011414801.4A CN202011414801A CN112395114B CN 112395114 B CN112395114 B CN 112395114B CN 202011414801 A CN202011414801 A CN 202011414801A CN 112395114 B CN112395114 B CN 112395114B
Authority
CN
China
Prior art keywords
message
mail
middleware
module
message middleware
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
CN202011414801.4A
Other languages
Chinese (zh)
Other versions
CN112395114A (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.)
Zhenkunxing Network Technology Nanjing Co ltd
Original Assignee
Zhenkunxing Network Technology Nanjing 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 Zhenkunxing Network Technology Nanjing Co ltd filed Critical Zhenkunxing Network Technology Nanjing Co ltd
Priority to CN202011414801.4A priority Critical patent/CN112395114B/en
Publication of CN112395114A publication Critical patent/CN112395114A/en
Application granted granted Critical
Publication of CN112395114B publication Critical patent/CN112395114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/107Computer-aided management of electronic mailing [e-mailing]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

Embodiments of the present disclosure relate to a method, computing device, and computer-readable storage medium for processing messages. The method comprises the following steps: receiving a message through one of a plurality of message-middleware interfaces provided by a message-middleware module; if the message is determined to have the abnormity, sending a mail to a sender of the message through a mail module provided by the message middleware module for indicating that the message has the abnormity; and if it is determined that the message is not anomalous, sending, by the message middleware module, the message to a message middleware server of the plurality of message middleware servers that is associated with the one message middleware interface. The technical scheme of the disclosure can reduce redundant codes in the micro service system and reduce the cost of code maintenance and modification.

Description

Method, computing device, and computer-readable storage medium for processing messages
Technical Field
Embodiments of the present disclosure relate generally to the field of information processing, and more particularly, to methods, computing devices, and computer-readable storage media for processing messages.
Background
Microservices are an architectural approach for building applications. The architectural approach of using microservices is different from the more traditional monolithic approach. In particular, architectural approaches employing microservices may split an application into multiple core functions, each of which may be referred to as a service. These services can be built and deployed individually so that the individual services do not interact with each other in normal operation and in the event of a failure.
With the development of micro-services in the internet technology, various message middleware services are also widely used. Message middleware, which may be referred to simply as MQ, is a queue-based and messaging technology that can provide reliable messaging, either synchronous or asynchronous, to application systems in a network environment. In practical applications, more than one message middleware may be used by a company, and one message middleware may be present in more than one microservice, which results in a plurality of message middleware having a large amount of repeatedly configured codes. It is extremely inconvenient to maintain multiple sets of the same code. Furthermore, if even minor modifications to the code are required due to demand changes, corresponding modifications to the configuration of the message middleware in all microservices are required. Modifying multiple message-middlewares results in a need for extensive modifications to the code of the overall system, and such modifications are also detrimental to the stability and operation of the system since the services that comprise the message-middlewares may all need to be restarted.
Disclosure of Invention
Embodiments of the present disclosure provide a method, computing device, and computer-readable storage medium for processing a message, which can reduce redundant code in a microservice system and reduce the cost of code maintenance and modification.
In a first aspect of the disclosure, a method for processing a message is provided. The method comprises the following steps: receiving a message through one of a plurality of message middleware interfaces provided by a message middleware module, the message middleware module encapsulating a plurality of message middleware, the plurality of message middleware being associated with a plurality of message middleware interfaces, the message being associated with the one message middleware interface; if the message is determined to have the abnormity, sending a mail to a sender of the message through a mail module provided by the message middleware module for indicating that the message has the abnormity; and if it is determined that the message is not anomalous, sending, by the message middleware module, the message to a message middleware server of the plurality of message middleware servers that is associated with the one message middleware interface.
According to a second aspect of the present invention, there is also provided a computing device comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions when executed by the at least one processing unit, cause the computing device to perform the method of the first aspect of the disclosure.
According to a third aspect of the present disclosure, there is also provided a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a machine, performs the method of the first aspect of the disclosure.
In some embodiments, wherein the message middleware module encapsulates the plurality of message middleware in a form that removes redundant code between the plurality of message middleware, the sender of the message is a microservice cluster used or controlled by a plurality of users.
In some embodiments, the method for processing messages further comprises: information associated with the message is stored in a message log.
In some embodiments, the method for processing messages further comprises: if the message fails to be sent, sending a mail to a sender of the message through a mail module provided by the message middleware module for indicating the failure to send the message, wherein the sender of the message is a micro-service cluster used or controlled by a plurality of users.
In some embodiments, the method for processing messages further comprises: receiving the mail through one of a synchronous mail interface and an asynchronous mail interface provided by the message middleware module, the synchronous mail interface and the asynchronous mail interface being associated with the mail module provided by the message middleware module, the received mail being associated with the one mail interface and with the belonging object of the message middleware module; and sending the received mail to the belonging object through a high concurrent mail queue provided by the message middleware module.
In some embodiments, the method for processing messages further comprises: the receipt and transmission of the mail is monitored by an internal middleware message module provided by the message middleware module.
In some embodiments, the method for processing messages further comprises: and if the mail fails to be sent, sending the mail to the sender of the mail through the mail module for indicating that the mail fails to be sent.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the embodiments of the disclosure, nor is it intended to be limiting as to the scope of the embodiments of the disclosure.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following more particular descriptions of exemplary embodiments of the disclosure as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the disclosure.
Fig. 1 illustrates a schematic diagram of a system for processing messages in which devices and/or methods according to embodiments of the present disclosure may be implemented.
Fig. 2 shows a flow diagram of a method for processing a message according to an embodiment of the present disclosure.
Fig. 3 shows a schematic diagram of a process for processing a message according to an embodiment of the disclosure.
Fig. 4 shows a flow diagram of a method for processing a message according to an embodiment of the present disclosure.
Fig. 5 shows a flow diagram of a method for processing a message according to an embodiment of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example device that can be used to implement embodiments of the present disclosure.
Like or corresponding reference characters designate like or corresponding parts throughout the several views.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The term "include" and variations thereof as used herein is meant to be inclusive, e.g., "including but not limited to". Unless specifically stated otherwise, the term "or" means "and/or". The term "based on" means "based at least in part on". The terms "one example embodiment" and "one embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," and the like may refer to different or the same object. Other explicit and implicit definitions are also possible below.
As described above, in the conventional message middleware usage process, a plurality of message middleware may have a large amount of repeatedly configured codes, so that maintenance and modification of the plurality of message middleware may result in a large amount of modification to the codes of the entire system, and since services including the message middleware may all need to be restarted, such modification is also not beneficial to the stability and operation and maintenance of the system.
To address, at least in part, one or more of the above problems and other potential problems, example embodiments of the present disclosure propose a method for processing a message. The method comprises the following steps: receiving a message through one of a plurality of message middleware interfaces provided by a message middleware module, the message middleware module encapsulating a plurality of message middleware, the plurality of message middleware being associated with a plurality of message middleware interfaces, the message being associated with the one message middleware interface; if the message is determined to have the abnormity, sending a mail to a sender of the message through a mail module provided by the message middleware module for indicating that the message has the abnormity; and if it is determined that the message is not anomalous, sending, by the message middleware module, the message to a message middleware server of the plurality of message middleware servers that is associated with the one message middleware interface.
In the scheme, a plurality of message middleware can be packaged together, so that a user of the message middleware can directly use the corresponding message middleware without considering the configuration of a single message middleware, thereby simplifying redundant codes in the micro-service system, increasing the use scene and type of message processing and improving the user experience.
Fig. 1 illustrates a schematic diagram of a system 100 for processing messages in which devices and/or methods according to embodiments of the present disclosure may be implemented. The system 100 for processing messages in fig. 1 includes a computing device 110, a sender 120, and a message-middleware server 130, wherein the computing device 110 includes a message-middleware module 111, according to an embodiment of the present disclosure.
In the system 100 for processing messages in fig. 1, the sender 120 may be, for example, a microservice cluster used or controlled by multiple users, such as developers. Sender 120 may send a message or mail to computing device 110 and message middleware module 111 included therein for processing. A plurality of message middleware, such as KAFKA message middleware, rockmq message middleware, RabbitMQ message middleware, ActiveMQ message middleware, Redis message middleware, and ZeroMQ message middleware, may be encapsulated in the message middleware module 111. The message sent by the sender 120 may be provided to a corresponding one of the message middleware described above and then provided by the message middleware module 111 to a corresponding one of the message middleware servers 130. Thus, the message middleware server 130 may include, for example, a KAFKA message middleware server, a rockmq message middleware server, a RabbitMQ message middleware server, an ActiveMQ message middleware server, a Redis message middleware server, and a ZeroMQ message middleware server.
In some embodiments, computing device 110 may have one or more processing units, including special purpose processing units such as GPUs, FPGAs, and ASICs, as well as general purpose processing units such as CPUs. In addition, one or more virtual machines may also be running on each computing device.
It should be understood that the system 100 for processing messages is merely exemplary and not limiting, and is extensible. For example, more computing devices 110 may be included in the system 100 for processing messages, such that the disclosed aspects for processing messages may be more efficiently implemented through, for example, parallel computing and distributed computing. Thus, the present disclosure can reduce redundant code in the microservice system, and reduce the cost of code maintenance and modification.
In the system 100 for processing messages in fig. 1, data transmission, instruction transmission, and the like communication between the computing device 110 and the message middleware module 111 and the sender 120 and the message middleware server 130 may be performed through a network.
Fig. 2 shows a flow diagram of a method 200 for processing a message according to an embodiment of the present disclosure. The method 200 may be implemented by the computing device 110 and the message middleware module 111 shown in fig. 1, or by other suitable devices. It should be understood that method 200 for processing messages may also include additional steps not shown and/or may omit steps shown, as the scope of embodiments of the present disclosure is not limited in this respect.
At block 202, the computing device 110 receives a message sent by the sender 120 through one of a plurality of message-middleware interfaces provided by the message-middleware module 111, the message-middleware module 111 encapsulating a plurality of message-middleware associated with a plurality of message-middleware interfaces, the message associated with the one message-middleware interface. For example, if the message sent by sender 120 is associated with KAFKA message middleware and a KAFKA message middleware interface, computing device 110 receives the message sent by sender 120 through the KAFKA message middleware interface provided by message middleware module 111.
According to embodiments of the present disclosure, sender 120 may know in advance the type of the plurality of message-middleware interfaces provided by message-middleware module 111, and may send the message to an appropriate message-middleware interface of the plurality of message-middleware interfaces provided by message-middleware module 111 according to the type of message-middleware associated with the message to be sent. For example, if a message to be sent by sender 120 involves a rockmq message middleware, sender 120 will send the message to message middleware module 111 through a rockmq message middleware interface provided by message middleware module 111.
According to an embodiment of the present disclosure, the message middleware module 111 may encapsulate a plurality of message middleware in a form of removing redundant code between the plurality of message middleware, and a sender of a message may be a micro service cluster used or controlled by a plurality of users. For example, the message middleware module 111 may cause a plurality of message middleware to share a code that can be commonly used, so that the code that can be commonly used only needs to be stored once. Therefore, the message middleware module 111 not only can encapsulate a plurality of message middleware in a form of saving storage space, but also can make only one modification to the code that can be commonly used among a plurality of message middleware when the encapsulated plurality of message middleware needs to be modified.
At block 204, the computing device 110 determines whether there is an anomaly in the message sent by the sender 120. According to an embodiment of the present disclosure, an abnormal message may include, for example, a situation where the message cannot be identified or an operation to be caused by the message cannot be implemented or is obviously wrong due to a code or semantic error included in the message. Thus, the exception message may cause subsequent operations of the microservice system to be erroneous and thus need not be actually sent.
Thus, at step 204, when the computing device 110 determines that there is an anomaly in the message sent by the sender 120, the method 200 proceeds to step 206; when the computing device 110 determines that there is no anomaly in the message sent by the sender 120, the method 200 proceeds to step 208.
At step 206, the computing device 110 sends a mail to the sender 120 of the message via a mail module provided by the message middleware module 111 to indicate that there is an anomaly in the message. According to other embodiments of the present disclosure, the computing device 110 may also notify the sender 120 of the message of the existence of an anomaly in the message by other forms, such as sending a message.
At step 208, the message sent by the sender 120 is sent by the message middleware module 111 in the computing device 110 to a message middleware server of the plurality of message middleware servers that is associated with the one message middleware interface. For example, if the message sent by sender 120 is associated with KAFKA message middleware, a KAFKA message middleware interface, and a KAFKA server, message middleware module 111 sends the message sent by sender 120 to the KAFKA server.
With the technical solution of the method 200, the message middleware module 111 encapsulates a plurality of message middleware and provides a plurality of message middleware interfaces for each message middleware for which messages can be sent by the sender 120. Thus, sender 120 may advantageously use multiple message middleware interfaces provided by message middleware module 111 to send different kinds of messages associated with different message middleware without having to know in particular how message middleware module 111 encapsulates multiple message middleware and how messages will be processed.
Fig. 3 shows a schematic diagram of a process 300 for processing a message according to an embodiment of the disclosure. The actions involved in steps 202 to 208 of method 200 as described hereinbefore may correspond to part of the process in process 300.
The sender 120 and the message middleware module 111 represented by the dashed box in fig. 3 are the same as the sender 120 and the message middleware module 111 in fig. 1 according to an embodiment of the present disclosure. As shown in FIG. 3, the sender 120 may send a message to the message middleware module 111 through one of a plurality of message middleware interfaces, including a first message middleware interface 310-1, a second message middleware interface 310-2, and a third message middleware interface 310-3, which may be collectively referred to as message middleware interface 310, provided by the message middleware module 111.
After receiving the message sent by the sender 120, the message monitoring process 320 included in the message middleware module 111 may be executed, and a corresponding monitoring process 321 may be executed. For example, when there is an anomaly in a message sent by the sender 120, performing the monitoring process 321 may include sending a mail to the sender 120 of the message through a mail module provided by the message middleware module 111 for indicating that there is an anomaly in the message.
The sending process 322 included in the message middleware module 111 may be performed when there is no abnormality in the message sent by the sender 120. At this time, the message middleware module 111 transmits the message transmitted by the sender 120 to a message middleware server associated with a message middleware interface that receives the message transmitted by the sender 120 among a plurality of message middleware servers including a first message middleware server 130-1, a second message middleware server 130-2, and a third message middleware server 130-3, which may be collectively referred to as the same message middleware server 130 as in fig. 1.
As shown in fig. 3, messages received by the message middleware server 130-1, the second message middleware server 130-2, and the third message middleware server 130-3 may be provided to a recipient 330 of the message. According to an embodiment of the present disclosure, the recipient 330 may be, for example, another microservice cluster used or controlled by multiple users, such as developers.
After the recipient 330 receives the message, a message handling process 331 shown in fig. 3 may be performed. For example, if the recipient 330 successfully processed the message, the process 331 may include storing data associated with the process of processing the message or the results of processing the message and notifying the sender 120 that the message has been successfully processed, e.g., by mail or message. If the recipient 330 fails to process the message, the process 331 may notify the sender 120, for example, by mail or message, of the failure of the message to be processed in a package.
Fig. 4 shows a flow diagram of a method 400 for processing a message according to an embodiment of the present disclosure. The method 400 may likewise be implemented by the computing device 110 and the message middleware module 111 shown in fig. 1, as well as by other suitable devices. It should be understood that the method 400 for processing messages may also include additional steps not shown and/or may omit illustrated steps, as the scope of embodiments of the disclosure is not limited in this respect. Method 400 of processing a message is a specific embodiment of method 200 of processing a message.
At step 402, the computing device 110 receives a message sent by the sender 120 through one of a plurality of message-middleware interfaces provided by the message-middleware module 111, the message-middleware module 111 encapsulating a plurality of message-middleware associated with a plurality of message-middleware interfaces, the message associated with the one message-middleware interface. The specific content of the action in step 402 is the same as the action in step 202, and is not described herein again.
At step 404, the computing device 110 determines whether there is an anomaly in the message sent by the sender 120. When the computing device 110 determines that there is an anomaly in the message sent by the sender 120, the method 400 proceeds to step 406; when the computing device 110 determines that there is no anomaly in the message sent by the sender 120, the method 400 proceeds to step 408. The specific content of the action involved in step 404 is the same as the action involved in step 204, and is not described herein again.
At step 406, the computing device 110 sends a mail to the sender 120 of the message via a mail module provided by the message middleware module 111 to indicate that there is an anomaly in the message. The specific content of the action in step 406 is the same as the action in step 206, and is not described herein again.
At step 408, the message middleware module 111 stores information associated with the message in a message log for logging and subsequent use. According to embodiments of the present disclosure, such associated information may include information of the sender of the message, the time of transmission, the destination of the message, the purpose of the message, and the like.
At step 410, the message sent by the sender 120 is sent by the message middleware module 111 in the computing device 110 to a message middleware server of the plurality of message middleware servers that is associated with the one message middleware interface. The specific content of the action involved in step 410 is the same as the action involved in step 208, and is not described herein again.
At step 412, computing device 110 determines whether the transmission of the message in step 410 failed. According to an embodiment of the present disclosure, the transmission of the message may fail due to, for example, a transmission error of the message middleware module 111 and a reception error of the message middleware server 130. When the message transmission fails, the method 400 proceeds to step 414.
At step 414, computing device 110 sends a mail to sender 120 of the message via a mail module provided by message middleware module 111 to indicate a failure to send the message. According to other embodiments of the present disclosure, the computing device 110 may also notify the sender 120 of the message of the failure to send the message by other forms, such as sending a message.
With continued reference to fig. 3, the actions involved in steps 402 to 414 of method 400 as described previously may correspond to part of the process 300. The specific content of the actions involved in steps 402, 404, 406, and 410 is the same as the actions involved in steps 402, 404, 406, and 208, and therefore the correspondence between the actions involved in steps 402, 404, 406, and 410 and the process 300 is not described again.
According to embodiments of the present disclosure, for the monitoring process 321, when there is no anomaly in the message sent by the sender 120, performing the monitoring process 321 may include storing, by the message middleware module 111, information associated with the message in a message log for logging and subsequent use.
When the computing device 110 determines that the sending of the message failed, a failure notification process 323 included in the message middleware module 111 may be performed, such as sending a mail to the sender 120 of the message via a mail module provided by the message middleware module 111 for indicating that the sending of the message failed.
Fig. 5 shows a flow diagram of a method 500 for processing a message according to an embodiment of the present disclosure. The method 500 may likewise be implemented by the computing device 110 and the message middleware module 111 shown in fig. 1, as well as by other suitable devices. It should be understood that the method 500 for processing messages may also include additional steps not shown and/or may omit illustrated steps, as the scope of embodiments of the present disclosure is not limited in this respect. The method 500 of processing a message may be an additional embodiment of the method 200 and the method 400 of processing a message. Thus, method 500 may be performed in conjunction with method 200 or method 400, or may be performed separately, in accordance with embodiments of the present disclosure.
At step 502, computing device 110 receives a mail through one of a synchronous mail interface and an asynchronous mail interface provided by message middleware module 111, the synchronous mail interface and the asynchronous mail interface being associated with the mail module provided by message middleware module 111, the received mail being associated with the one mail interface and with the belonging object of message middleware module 111.
According to embodiments of the present disclosure, the sender 120 may send a mail to be sent to a synchronous mail interface or an asynchronous mail interface provided by the message middleware module 111 depending on the type of mail interface associated with the mail. For example, if the mail to be sent by the sender 120 relates to a synchronous mail, the sender 120 will send the mail to the message middleware module 111 through a synchronous mail interface provided by the message middleware module 111.
According to an embodiment of the present disclosure, the belonging object of the message middleware module 111 may include a provider of the message middleware module 111, and sending the mail to the belonging object of the message middleware module 111 may include sending the mail to an administrator of the provider of the message middleware module 111. Further, the sent mail may be associated with the relationship sent by the sender 120 to the message middleware module 111 and may include feedback, suggestions, requirements, etc. for the microservice system.
At step 504, the computing device 110 monitors receipt of the mail through an internal middleware message module provided by the message middleware module 111. According to an embodiment of the present disclosure, integration of message processing and mail transmission for a microservice system may be efficiently and economically achieved by monitoring the receipt of mail using an internal middleware message module provided by the message middleware module 111.
At step 506, computing device 110 sends the received mail to the belonging object through the high concurrency mail queue provided by message middleware module 111. According to embodiments of the present disclosure, a high concurrency mail queue may support concurrency of a large number of mails, and thus, the mailing associated with the micro service system may be more efficiently implemented.
At step 508, the computing device 110 monitors the sending of the mail through an internal middleware message module provided by the message middleware module 111. According to an embodiment of the present disclosure, integration of message processing and mail transmission for a microservice system may be efficiently and economically achieved by monitoring the transmission of mail using an internal middleware message module provided by the message middleware module 111.
At step 510, computing device 110 determines whether the transmission of the mail failed in step 508. According to an embodiment of the present disclosure, the sending of the mail may fail due to, for example, a reception error of the message middleware module 111, a sending error of a high-concurrency mail queue, and a reception error of a mail recipient, for example, an administrator of a provider of the message middleware module 111. When the mail transmission fails, the method 500 proceeds to step 512.
At step 512, the computing device 110 sends a mail to the sender 120 of the mail via a mail module provided by the message middleware module 111 for indicating a failure to send the mail. According to other embodiments of the present disclosure, the computing device 110 may also notify the sender 120 of the message of the failure to send the mail by other means, such as sending a message.
With continued reference to fig. 3, the actions involved in steps 502 to 512 of method 500 as described previously may correspond to part of the process 300.
As shown in FIG. 3, the sender 120 may send the mail through one of a synchronous mail interface 340-1 and an asynchronous mail interface 340-2, which may be collectively referred to as mail interfaces 340, provided by the message middleware module 111.
After receiving the mail sent by the sender 120, a mail monitoring process 350 included in the message middleware module 111 may be executed. Performing the mail monitoring process 350 may include, for example, monitoring the receipt of the mail through an internal middleware message module provided by the message middleware module 111. Further, performing the mail monitoring process 350 may include, for example, monitoring a sending process 361 performed by the mail through the high-concurrency mail queue 360 via an internal middleware message module provided by the message middleware module 111, such as sending the received mail to an belonging object of the message middleware module 111 via the high-concurrency mail queue provided by the message middleware module 111. It is noted that performing the mail monitoring process 350 may also include monitoring the sending of the mail through an internal middleware message module provided by the message middleware module 111.
When the computing device 110 determines that the transmission of the mail fails, a failure notification process 362 included in the message middleware module 111 may be performed, such as transmitting the mail to the sender 120 of the message through a mail module provided by the message middleware module 111 for indicating that the transmission of the mail fails.
As shown in FIG. 3, an administrator 370 of the message middleware module 111 may enable or disable execution of the mail monitoring process 350 by sending instructions. Further, the message monitoring process 320 may invoke the mail monitoring process 350, and the mail monitoring process 350 may also invoke the message monitoring process 320, for example, through the mail interface 340, thereby enabling integration of message processing and mail sending for the microservice system to be efficiently and economically implemented.
The system 100 for processing a message, the method 200 for processing a message according to an embodiment of the present disclosure, the process 300 for processing a message according to an embodiment of the present disclosure, the method 400 for processing a message according to an embodiment of the present disclosure, and the method 500 for processing a message according to an embodiment of the present disclosure are described above with reference to fig. 1 to 5. It should be understood that the above description is intended to better illustrate what is described in the embodiments of the present disclosure, and not to limit in any way.
It should be understood that the number of elements and the size of physical quantities employed in the embodiments of the present disclosure and the various drawings are merely examples and are not intended to limit the scope of the embodiments of the present disclosure. The above numbers and sizes may be arbitrarily set as needed without affecting the normal implementation of the embodiments of the present disclosure.
Through the above description with reference to fig. 1 to 5, the technical solution according to the embodiments of the present disclosure has many advantages over the conventional solution.
For example, by using the technical scheme of the present disclosure, especially the message middleware module according to the technical scheme of the present disclosure, the repeated redundant codes in the micro service system can be greatly simplified, the function of the message middleware can be conveniently expanded and maintained, meanwhile, the failure rate of the message middleware can be reduced, the stability and reliability of the micro service system can be enhanced, and the use of the message middleware can be simplified. In addition, by using the technical scheme disclosed by the invention, unified monitoring on the messages in the micro-service system can be realized.
Moreover, by using the technical scheme of the present disclosure, the mail module for mail receiving and sending can be integrated in the message middleware module at the same time, which is greatly convenient for sending mails of types such as text, template, HTML and the like, and can support high concurrency environment through the internal mail queue, support one-key control of synchronous and asynchronous sending of different mails, indicate black and white lists of mail accounts, and realize mutual calling with the internal message middleware queue. In addition, by using the technical scheme disclosed by the invention, the statistics of mails with different numbers, mails of different senders and receivers and the unified management of all mail information can be realized, so that the development cost can be saved, and the plugging and unplugging use can also be realized.
Fig. 6 illustrates a schematic block diagram of an example device 600 that may be used to implement embodiments of the present disclosure. Computing device 110 in fig. 1 may be implemented by device 600 in accordance with an embodiment of the present disclosure. As shown, device 600 includes a Central Processing Unit (CPU) 601 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 602 or loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM, various programs and data required for the operation of the device 600 may also be stored. The CPU, ROM, and RAM are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The various processes and processes described above, such as method 200, method 400, and method 500, may be performed by the central processing unit 601. For example, in some embodiments, the methods 200, 400, and 500 may be implemented as computer software programs tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM and/or the communication unit 609. When loaded into RAM and executed by a CPU, the computer program may perform one or more of the actions of method 200, method 400 and method 500 described above.
Embodiments of the present disclosure may relate to methods, apparatuses, systems, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for performing 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 is 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 of a non-exhaustive list of computer-readable storage media include: 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 waveguides or other transmission media, e.g., optical pulses through fiber optic cables, 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 through the Internet, for example, using an Internet service provider. In some embodiments, the electronic circuitry may execute computer-readable program instructions to implement aspects of embodiments of the present disclosure by utilizing state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
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 processing unit 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 processing unit 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.
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.

Claims (9)

1. A method for processing a message, comprising:
receiving a message through one of a plurality of message middleware interfaces provided by a message middleware module, the message middleware module encapsulating a plurality of message middleware associated with the plurality of message middleware interfaces, the message associated with the one message middleware interface, wherein the message middleware module encapsulates the plurality of message middleware by removing redundant code between the plurality of message middleware;
if the message is determined to have the abnormity, sending a mail to a sender of the message through a mail module provided by the message middleware module for indicating that the message has the abnormity;
sending, by the message middleware module, the message to a message middleware server of a plurality of message middleware servers associated with the one message middleware interface if it is determined that the message is not anomalous; and
receiving mail through one of a synchronous mail interface and an asynchronous mail interface provided by the message middleware module, the synchronous mail interface and the asynchronous mail interface being associated with a mail module provided by the message middleware module, the received mail being associated with the one mail interface and with a provider of the message middleware module.
2. The method of claim 1, the sender of the message being a microservice cluster used or controlled by a plurality of users.
3. The method of claim 1, further comprising:
storing information associated with the message in a message log.
4. The method of claim 1, further comprising:
and if the message fails to be sent, sending a mail to the sender of the message through a mail module provided by the message middleware module for indicating that the message fails to be sent.
5. The method of claim 1, further comprising:
sending the received mail to the provider through a high concurrency mail queue provided by the message middleware module.
6. The method of claim 5, further comprising:
monitoring the receiving and the sending of the mail through an internal middleware message module provided by the message middleware module.
7. The method of claim 5, further comprising:
and if the mail fails to be sent, sending the mail to the sender of the mail through the mail module so as to indicate that the mail fails to be sent.
8. A computing device, comprising:
at least one processing unit; and
at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions when executed by the at least one processing unit causing the computing device to perform the method of any of claims 1-7.
9. A computer-readable storage medium, having stored thereon a computer program which, when executed by a machine, implements the method of any of claims 1 to 7.
CN202011414801.4A 2020-12-07 2020-12-07 Method, computing device, and computer-readable storage medium for processing messages Active CN112395114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011414801.4A CN112395114B (en) 2020-12-07 2020-12-07 Method, computing device, and computer-readable storage medium for processing messages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011414801.4A CN112395114B (en) 2020-12-07 2020-12-07 Method, computing device, and computer-readable storage medium for processing messages

Publications (2)

Publication Number Publication Date
CN112395114A CN112395114A (en) 2021-02-23
CN112395114B true CN112395114B (en) 2021-05-07

Family

ID=74604383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011414801.4A Active CN112395114B (en) 2020-12-07 2020-12-07 Method, computing device, and computer-readable storage medium for processing messages

Country Status (1)

Country Link
CN (1) CN112395114B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160014575A1 (en) * 2000-04-25 2016-01-14 Telecommunication Systems, Inc. Wireless Internet Gateway Limiting Message Distribution
CN106453334A (en) * 2016-10-19 2017-02-22 北京悦畅科技有限公司 Communication protocol switching method, apparatus and system
CN107317742A (en) * 2016-04-27 2017-11-03 北京京东尚科信息技术有限公司 A kind of message treatment method and system
CN110147285A (en) * 2018-02-13 2019-08-20 北京京东尚科信息技术有限公司 Message treatment method and device based on message queue
CN110838970A (en) * 2019-11-04 2020-02-25 宜人恒业科技发展(北京)有限公司 Message distribution method, device and system
CN110971639A (en) * 2018-09-30 2020-04-07 广州虎牙信息科技有限公司 Message distribution method, message management system, server, and computer storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100478896C (en) * 2007-06-08 2009-04-15 北京大学 Method for accessing information service in component operation support platform
CN101764746B (en) * 2009-12-17 2012-07-18 中国电力科学研究院 Method and device for sending data
CN107819831B (en) * 2017-10-23 2020-09-01 丹露成都网络技术有限公司 Metaq and mns-based universal message system
CN110213068B (en) * 2018-03-06 2021-12-21 腾讯科技(深圳)有限公司 Message middleware monitoring method and related equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160014575A1 (en) * 2000-04-25 2016-01-14 Telecommunication Systems, Inc. Wireless Internet Gateway Limiting Message Distribution
CN107317742A (en) * 2016-04-27 2017-11-03 北京京东尚科信息技术有限公司 A kind of message treatment method and system
CN106453334A (en) * 2016-10-19 2017-02-22 北京悦畅科技有限公司 Communication protocol switching method, apparatus and system
CN110147285A (en) * 2018-02-13 2019-08-20 北京京东尚科信息技术有限公司 Message treatment method and device based on message queue
CN110971639A (en) * 2018-09-30 2020-04-07 广州虎牙信息科技有限公司 Message distribution method, message management system, server, and computer storage medium
CN110838970A (en) * 2019-11-04 2020-02-25 宜人恒业科技发展(北京)有限公司 Message distribution method, device and system

Also Published As

Publication number Publication date
CN112395114A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
US10831826B2 (en) Validation of schema and schema conformance verification
US8799906B2 (en) Processing a batched unit of work
US10313380B2 (en) System and method for centralized virtual interface card driver logging in a network environment
CN104199957B (en) A kind of implementation method of Redis general-purpose proxies
US9674127B2 (en) Selective message republishing to subscriber subsets in a publish-subscribe model
CN104579905A (en) Message passing method and system, MOM (message oriented middleware) server and receiving terminal
CN111371898B (en) Message monitoring method, device, equipment and storage medium
CN111654555B (en) Method, electronic device and storage medium for message distribution
CN114124881B (en) Message pushing method based on priority and related device
CN110399236B (en) Message queue adapting method, device, medium and electronic equipment
CN111124801A (en) Intelligent system resource monitoring method and device and computer readable storage medium
CN109325002B (en) Text file processing method, device and system, electronic equipment and storage medium
US10530902B2 (en) Method of operating a protocol translator
CN112395114B (en) Method, computing device, and computer-readable storage medium for processing messages
CN110474827B (en) FIN message multi-environment forwarding method, equipment and system
US8112666B2 (en) Message producer with message type validation
US20110093483A1 (en) Method and apparatus for data exchange in a distributed system
CN111181842A (en) Mail sending method and system based on different business logics
CN112148324A (en) Method, apparatus and computer-readable storage medium for upgrading electronic device
CN117193225B (en) Wafer manufacturing process flow control method and system
CN114567536B (en) Abnormal data processing method, device, electronic equipment and storage medium
US20230308527A1 (en) Method, device, and computer program product for document transmission
CN112596922B (en) Communication management method, device, equipment and medium
CN113742035A (en) Edge task execution method and device
CN114491674A (en) Log processing method, device and equipment based on block chain

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