CN115237637A - Message sending system, method and device, electronic equipment and storage medium - Google Patents

Message sending system, method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115237637A
CN115237637A CN202210957450.4A CN202210957450A CN115237637A CN 115237637 A CN115237637 A CN 115237637A CN 202210957450 A CN202210957450 A CN 202210957450A CN 115237637 A CN115237637 A CN 115237637A
Authority
CN
China
Prior art keywords
message
target
sent
sending
transaction
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
CN202210957450.4A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202210957450.4A priority Critical patent/CN115237637A/en
Publication of CN115237637A publication Critical patent/CN115237637A/en
Pending legal-status Critical Current

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
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

Abstract

The application discloses a message sending system, a message sending method, a message sending device, electronic equipment and a storage medium, relates to the technical field of message middleware and is used for effectively preventing messages from being lost. The message processing equipment can acquire each message to be sent from a database with pre-established connection and send each message to the producer equipment; the producer device may send each message to the MQ separately; for each message, the message processing device may further obtain status information of whether the message is successfully sent to the MQ, and for a target message whose status information is failed to be sent, may re-determine the target message as a message included in the message to be sent, obtain the target message from the database again, send the target message to the producer device again, and the producer device may send the target message to the MQ again, so that it may be ensured that the message may be successfully sent to the MQ, and the message loss may be effectively prevented.

Description

Message sending system, method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of message middleware technologies, and in particular, to a message sending system, a message sending method, a message sending device, an electronic device, and a storage medium.
Background
In the related art, when a producer device sends a Message generated by a certain transaction to a consumer device, the Message may be sent to a Message Queue (MQ), and then the MQ transfers the Message to the consumer device.
However, if the producer device is sending messages to the MQ, network jitter or MQ service anomalies, etc., may result in messages not being sent to the MQ, and a message loss situation may occur.
Therefore, how to prevent the message loss is a technical problem that needs to be solved at present.
Disclosure of Invention
The application provides a message sending system, a message sending method, a message sending device, electronic equipment and a storage medium, which are used for effectively preventing messages from being lost.
In a first aspect, the present application provides a message sending system, including:
the message processing equipment is used for acquiring each message to be sent from a database which is connected in advance and sending each message to the producer equipment;
the producer device is used for receiving each message and sending each message to a message queue MQ;
the message processing device is further configured to obtain state information of whether each message is successfully sent to the MQ; for the target message with the state information of failed transmission, determining the target message as the message contained in the message to be transmitted again, acquiring the target message from the database again, and transmitting the target message to the producer equipment again;
the producer device is further configured to receive the target message and send the target message to the MQ.
In a possible implementation manner, the message processing device is further configured to, for any transaction, obtain a message generated in the transaction process by the transaction; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
In a possible implementation manner, the message processing device is specifically configured to determine whether the transaction is successful, and if so, determine that a set sending condition is satisfied.
In a possible implementation manner, the message processing device is further configured to identify a type of a message generated during a transaction process for the transaction, and store the message into the database if the type of the message is located in a target type that is stored in advance.
In a possible implementation manner, the message processing device is specifically configured to acquire, for each message sent to the producer device, a time when the producer device sends the message to the MQ and a failure time period in which a sending failure occurs, and determine that the status information of the message is a sending failure if the time is within the failure time period.
In one possible embodiment, the producer device is further configured to generate state information of whether each message was successfully sent to the MQ;
the message processing device is specifically configured to obtain the status information generated by the producer device.
In a possible implementation manner, the message processing device is further configured to, for the target message, determine whether a transaction to which the target message belongs is located in a set target transaction set, and if so, determine the target message as a message included in a message to be sent again.
In a second aspect, the present application provides a message sending method, including:
acquiring each message to be sent from a database with a pre-established connection, and sending each message to a producer device, so that the producer device sends each message to a message queue MQ;
acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
In a possible embodiment, before obtaining each message to be sent from the database of the pre-established connection, the method further includes:
aiming at any transaction, acquiring a message generated in the transaction process; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
In one possible embodiment, determining that the set transmission condition is satisfied includes:
and judging whether the transaction is successful, if so, determining that a set sending condition is met.
In a possible embodiment, after the obtaining of the message generated by the transaction in the transaction process and before the saving of the message in the database when the set sending condition is determined to be met, the method further comprises:
and identifying the type of the message aiming at the message generated in the transaction process, and if the type of the message is in a pre-stored target type, then performing the subsequent step of storing the message into the database when the message is determined to meet the set sending condition.
In one possible embodiment, the state information of whether each message was successfully sent to the MQ is determined in the following manner:
for each message sent to the producer device, acquiring the time when the producer device sends the message to the MQ and a fault time period when a sending fault occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
In a possible implementation manner, after obtaining the status information of whether each message is successfully sent to the MQ, before the target message whose status information is a target message whose sending fails is determined again as a message included in a message to be sent, the method further includes:
and judging whether the transaction to which the target message belongs is in a set target transaction set or not aiming at the target message, and if so, determining the target message as the message contained in the message to be sent again.
In a third aspect, the present application provides a message sending method, where the method includes:
acquiring each message to be sent from a database with a connection established in advance, and sending each message to a message queue MQ;
acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
In a fourth aspect, the present application provides a message sending apparatus, including:
the first acquisition module is used for acquiring each message to be sent from a database with a pre-established connection, and sending each message to producer equipment, so that the producer equipment sends each message to a message queue MQ;
a second obtaining module, configured to obtain status information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
In a possible embodiment, the apparatus further comprises:
the determining module is used for acquiring a message generated in the transaction process aiming at any transaction; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
In a possible implementation manner, the determining module is specifically configured to determine whether the transaction is successful, and if so, determine that a set sending condition is met.
In a possible implementation manner, the determining module is further configured to identify a type of a message generated during a transaction process for the transaction, and if the type of the message is located in a target type stored in advance, store the message into the database when it is determined that a set sending condition is met.
In a possible implementation manner, the second obtaining module is specifically configured to obtain, for each message sent to the producer device, a time when the producer device sends the message to the MQ and a failure time period during which a sending failure occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
In a possible implementation manner, the second obtaining module is further configured to determine, for the target message, whether a transaction to which the target message belongs is located in a set target transaction set, and if yes, determine the target message as a message included in the message to be sent again.
In a fifth aspect, the present application provides a message sending apparatus, comprising:
the third acquisition module is used for acquiring each message to be sent from a database with a connection established in advance and sending each message to the message queue MQ;
a fourth obtaining module, configured to obtain status information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
In a sixth aspect, the present application provides an electronic device, which at least includes a processor and a memory, wherein the processor is configured to implement the steps of the message sending method according to any one of the above when executing a computer program stored in the memory.
In a seventh aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the message sending method as described in any one of the above.
In an eighth aspect, the present application provides a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the steps of the message sending method as described in any one of the above.
The message processing equipment can acquire each message to be sent from a database with pre-established connection and send each message to the producer equipment; the producer device may send each message to the MQ separately; for each message, the message processing device may further obtain status information of whether the message is successfully sent to the MQ, and for a target message whose status information is failed to be sent, may re-determine the target message as a message included in the message to be sent, obtain the target message from the database again, send the target message to the producer device again, and the producer device may send the target message to the MQ again, so that it may be ensured that the message may be successfully sent to the MQ, and the message loss may be effectively prevented.
Drawings
In order to more clearly illustrate the embodiments of the present application or the implementation manner in the related art, a brief description will be given below of the drawings required for the description of the embodiments or the related art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1A illustrates a messaging system diagram according to some embodiments;
FIG. 1B illustrates a first message sending process diagram provided by some embodiments;
fig. 2 is a diagram illustrating a second message sending process provided by some embodiments;
FIG. 3 illustrates a third messaging process diagram provided by some embodiments;
fig. 4 is a diagram illustrating a fourth message sending process provided by some embodiments;
fig. 5A is a diagram illustrating a fifth messaging process provided by some embodiments;
fig. 5B is a diagram illustrating a sixth messaging process provided by some embodiments;
fig. 6 is a diagram illustrating a seventh messaging process provided by some embodiments;
fig. 7 is a schematic diagram of a first message sending apparatus according to some embodiments;
FIG. 8 is a schematic diagram of a first electronic device according to some embodiments;
fig. 9 is a diagram illustrating an eighth messaging process provided by some embodiments;
fig. 10 is a schematic diagram of a second message sending apparatus according to some embodiments;
fig. 11 shows a schematic structural diagram of a second electronic device according to some embodiments.
Detailed Description
In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the embodiments described in the present application are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the brief descriptions of the terms in the present application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of the present application. These terms should be understood in their ordinary and customary meaning unless otherwise indicated.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between similar or analogous objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements expressly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and/or software code that is capable of performing the functionality associated with that element.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
The following briefly introduces the design concept of the embodiment of the present application:
in the related art, when a producer device sends a message generated by a certain transaction to a consumer device, the message may be sent to an MQ, and then the MQ transfers the message to the consumer device, and the consumer device processes the message. Wherein the message may be sent in a message sending manner of asynchronous message, for example, the producer device may not wait for the processing result of the message by the consumer device in real time after sending the message to the MQ. However, for asynchronous messages and the like, if the producer device were to send the message to the MQ, network jitter occurred or the MQ services were out of order, etc., it may result in the message not being sent to the MQ, and a loss of message situation may occur. Therefore, how to prevent the message loss is a technical problem that needs to be solved at present. In view of this, in order to solve the technical problem in the related art that a message may be lost when a producer device sends the message to an MQ, embodiments of the present application provide a message sending system, a method, an apparatus, an electronic device, and a storage medium. The following respectively describes a message sending system, a message sending method, a message sending device, an electronic device, and a storage medium provided in the embodiments of the present application.
Example 1:
all the implementation modes of the embodiment of the application can acquire, store, use, process and the like the data according with relevant regulations of national laws and regulations.
Fig. 1A is a schematic diagram of a messaging system according to some embodiments, and as shown in fig. 1A, the messaging system includes:
the message processing device 11 is configured to acquire each message to be sent from a database in which a connection is established in advance, and send each message to the producer device 12;
the producer device 12 is used for receiving each message and sending each message to a message queue MQ;
the message processing device 11 is further configured to obtain status information whether each message is successfully sent to the MQ; for the target message whose status information is failed to be sent, re-determining the target message as the message included in the message to be sent, obtaining the target message from the database again, and sending the target message to the producer device 12 again;
the producer device 12 is further configured to receive the target message and send the target message to the MQ.
In one possible implementation, the Message sending system may include a Message processing device 11, a producer device 12, a Message Queue (MQ), a consumer device, and the like. Since the present application mainly aims to solve the technical problem in the related art that messages may be lost when a producer device sends a message to an MQ, the details of a message queue and a consumer device are not repeated herein, and the description is mainly given for a message processing device and a producer device.
In one possible embodiment, for any transaction, the message processing device 11 may retrieve the messages generated during the transaction. Alternatively, in order to effectively prevent the message from being lost, the message processing apparatus 11 may store the message in the database of the pre-established connection, that is, persist the message in the database, when it is determined that the set transmission condition is satisfied. In one possible embodiment, data inconsistency may occur in order to avoid that, after a transaction is sent to the database in real time with a message generated during the transaction, a message already sent to the MQ or the like may have no way to rollback in the event of a transaction failure, and so on. To ensure data consistency, a message generated during the transaction may be sent to the database upon determining that the transaction was successful, such that the message may be sent to the MQ to ensure data consistency. Optionally, the message processing device 11 may obtain a real-time state of the transaction, may determine whether the current state of the transaction is a transaction success, and when it is determined that the current state of the transaction is a transaction success, may consider that a set sending condition is met, may store the message in the database, and may determine the message as a message included in the message to be sent.
In one possible embodiment, in order to ensure that the messages generated during the transaction are saved to the database again when the transaction is successful, so as to ensure data consistency, the transaction and the messages generated during the transaction may be configured to the same transaction, for example, configured to the same database transaction, and after the same transaction is configured, the execution sequence between the transaction and the messages generated during the transaction are saved to the database is generally that after the transaction is determined to be successful, the step of saving the messages generated during the transaction to the database is executed again, and compared with the case that the transaction and the messages generated during the transaction are configured to be independent two transactions, data inconsistency may be caused, and the data consistency can be ensured by the application that the transaction and the messages generated during the transaction are saved to the database.
In a possible implementation, the message processing device 11 may obtain each message to be sent from a database with a connection established in advance, and send each obtained message to the producer device 12. Upon receiving each message sent by the message processing device 11, the producer device 12 may send each message to a Message Queue (MQ), respectively.
In one possible implementation, after the producer device 12 sends the message to the MQ, to prevent the message from being lost, the message processing device 11 may obtain, for each message, state information whether the message was successfully sent to the MQ. The manner of acquiring the state information of whether the message is successfully sent to the MQ by the message processing device 11 is described later, and is not described herein again. Optionally, for any message, if the message has been successfully sent to the MQ, the status information of the message may be a successful sending, and the status of the message may be updated in the database to be a successful sending. And if the message was not successfully sent to the MQ, the status information of the message may be a failure to send, and the status of the message in the database may be updated to a failure to send.
In one possible embodiment, in order to prevent the message from being lost, for the target message with failed transmission (for convenience of description, the message which is not successfully transmitted to the MQ, that is, the message with failed transmission is referred to as the target message), the target message may be determined again as the message contained in the message to be transmitted, the target message may be obtained again from the database and transmitted to the producer device 12 again, and after the producer device 12 receives the target message, the target message may be transmitted to the MQ again, so that the message can be effectively prevented from being lost, and the producer device 12 can be effectively ensured to successfully transmit the message to the MQ.
It will be appreciated that if the producer device 12 again sends the target message to the MQ, and the sending fails again, the status information for the target message is still the sending failure, the steps of determining the target message again as the message contained in the message to be sent, retrieving the target message again from the database, sending the target message again to the producer device 12, receiving the target message by the producer device 12, and sending the target message again to the MQ may be repeated until the message is successfully sent to the MQ. It will be appreciated that if a message (target message) is successfully sent to the MQ, the status information of the message may be updated to be successfully sent, and the steps of treating it as the target message and treating it as the message to be sent may no longer be performed.
For convenience of understanding, the message sending process provided in the present application is described below by a specific embodiment. Fig. 1B is a schematic diagram illustrating a first message sending process provided in some embodiments, and as shown in fig. 1B, the process includes the following steps:
s101: the message processing device 11 obtains each message to be sent from the database in which the connection is established in advance, and sends each message to be sent to the producer device 12.
S102: the producer device 12 receives each message to be sent and sends each message to a Message Queue (MQ).
S103: for each message, the message processing device 11 obtains state information whether the message was successfully sent to the MQ; and for the target message of which the state information is the transmission failure, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device 12 again.
S104: the producer device 12 receives the target message and sends the target message to the MQ.
For convenience of understanding, the message sending process provided in the present application is described below by a specific embodiment. Fig. 2 is a schematic diagram illustrating a second message sending process provided in some embodiments, and as shown in fig. 2, the process includes the following steps:
s201: for any transaction, the message processing device 11 acquires a message generated in the transaction process, stores the message in the database when the transaction is determined to be successful, and determines the message as a message to be sent.
Optionally, the status information of the message in the database may be configured as "not sent yet".
S202: the message processing device 11 obtains each message to be sent from the database in which the connection is established in advance, and sends each message to be sent to the producer device 12.
S203: the producer device 12 receives each message and sends each message separately to a Message Queue (MQ).
S204: for each message, the message processing device 11 obtains state information whether the message was successfully sent to the MQ. If the status information is a message that the transmission is successful, the step S205 is executed; the step S206 is executed for the target message whose status information is transmission failure.
S205: the message processing apparatus 11 updates the status information of the message in the database to "transmission success", and does not determine the message as a message included in the message to be transmitted any more.
S206: the message processing device 11 updates the status information of the target message in the database to "failure to send", determines the target message as a message included in the message to be sent again, acquires the target message from the database again, and sends the target message to the producer device 12 again. The producer device 12 receives the target message and again sends the target message to the MQ.
It is understood that the step of S204 may be repeated after the step of S206, and will not be described herein. In addition, it can be understood that the message to be sent acquired by the message processing device 11 each time may include a message whose status information is "failed to send", or may include information related to "not yet sent" in S201, which is not described herein again.
Because the message processing device 11 of the present application can obtain each message to be sent from the database with which the connection is established in advance, and send each message to the producer device 12; the producer device 12 may send each message separately to the MQ; for each message, the message processing device 11 may further obtain status information of whether the message is successfully sent to the MQ, for a target message whose status information is failed to be sent, may redetermine the target message as a message included in the message to be sent, again obtain the target message from the database, again send the target message to the producer device 12, and the producer device 12 may send the target message to the MQ again, so that it may be ensured that the message may be successfully sent to the MQ, and the message loss may be effectively prevented.
In one possible embodiment, considering that messages generally cannot be successfully transmitted to MQ if network jitter occurs or MQ service is abnormal, in order to quickly and flexibly determine whether each message is successfully transmitted to the state information of MQ, the message processing device 11 may determine a period of time when network jitter occurs or MQ service is abnormal as a failure period of time when a transmission failure occurs, and at the same time, for each message transmitted to the producer device 12, the message processing device 11 may acquire a time when the producer device 12 transmits the message to MQ, and if the time when the producer device 12 transmits the message to MQ is within the failure period of time, it may consider that the message is not successfully transmitted to MQ, and may determine the state information of the message as a transmission failure.
For convenience of understanding, the message sending process provided in the present application is described below by a specific embodiment. Fig. 3 is a schematic diagram illustrating a third message sending process provided by some embodiments, and as shown in fig. 3, the process includes the following steps:
s301: for any transaction, the message processing device 11 acquires a message generated in the transaction process, stores the message in the database when the transaction is determined to be successful, and determines the message as a message to be sent.
S302: the message processing device 11 acquires each message to be sent from the database in which the connection is established in advance, and sends each message to be sent to the producer device 12.
S303: the producer device 12 receives each message and sends each message separately to a Message Queue (MQ).
S304: and for each message, acquiring the time when the producer device 12 sends the message to the MQ and a failure time period during which a sending failure occurs, determining the state information of the message as a sending failure if the time when the producer device 12 sends the message to the MQ is within the failure time period, determining the target message as the message contained in the message to be sent again, acquiring the target message from the database again, and sending the target message to the producer device 12 again. The producer device 12 receives the target message and again sends the target message to the MQ.
Additionally, in one possible embodiment, for each message, the producer device 12 may learn whether the message was successfully sent to the MQ after sending the message to the MQ and generate the state information of whether the message was successfully sent to the MQ, and if the message was successfully sent to the MQ, the state information corresponding to the message may be a transmission success, and if the message was not successfully sent to the MQ, the state information of the message may be a transmission failure. For each message, the message processing device 11 may obtain the state information corresponding to the message generated by the producer device 12, so as to know whether the message is successfully sent to the MQ, so that when it is recognized that if some message or messages are not successfully sent to the MQ, the message may be used as a target message, the target message is determined to be a message included in the message to be sent again, the target message is obtained from the database again, and the target message is sent to the producer device 12 again, so that the producer device 12 may send the target message to the MQ again, thereby effectively preventing the message from being lost.
In a possible embodiment, considering that some messages may not be important and may not cause negative effects such as data inconsistency even if the messages are lost, in order to relieve the pressure of the database, the message processing device 11 may identify the type of the message generated in the transaction process for the transaction, and if the type of the message is located in a target type stored in advance, the message may be considered to be important and needs to be stored in the database to prevent the message from being lost. Otherwise, if the type of the message is not in the pre-saved target type, the message may be deemed not to be significant, the message may not be saved to the database, the message may be sent directly to the producer device 12, and the producer device 12 sends the message directly to the MQ. The type of the message, the type of the target, and the like are not specifically limited in the present application, and may be flexibly set according to a requirement, and exemplarily, the type of the message may be a mechanism change, and the like.
For convenience of understanding, the message sending process provided in the present application is described below by a specific embodiment. Fig. 4 is a schematic diagram illustrating a fourth message sending process provided in some embodiments, and as shown in fig. 4, the process includes the following steps:
s401: for any transaction, the message processing device 11 obtains a message generated in the transaction process, identifies the type of the message, if the type of the message is in a pre-stored target type, stores the message in a database when the transaction is determined to be successful, and determines the message as a message to be sent.
S402: the message processing device 11 acquires each message to be sent from the database in which the connection is established in advance, and sends each message to be sent to the producer device 12.
S403: the producer device 12 receives each message and sends each message separately to a Message Queue (MQ).
S404: for each message, the message processing device 11 obtains the state information of whether each message was successfully sent to the MQ; and for the target message of which the state information is the transmission failure, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device 12 again.
S405: the producer device 12 receives the target message and sends the target message to the MQ.
In a possible implementation manner, in order to quickly and flexibly determine a message that needs to be retransmitted again from a target message that has failed to be transmitted, it may be determined whether a transaction to which the target message belongs is located in a set target transaction set for the target message that has failed to be transmitted, and if so, the target message may be determined again as a message that needs to be retransmitted again, and the target message may be determined as a message included in the message to be transmitted.
For convenience of understanding, the message sending process provided in the present application is described below by a specific embodiment. Fig. 5A is a schematic diagram illustrating a fifth message sending process provided in some embodiments, and as shown in fig. 5A, the process includes the following steps:
S501-A: for any transaction, the message processing device 11 acquires a message generated in the transaction process, identifies the type of the message, and if the type of the message is in a pre-stored target type, stores the message in a database when the transaction is determined to be successful, and determines the message as a message to be sent.
S502-A: the message processing device 11 acquires each message to be sent from the database in which the connection is established in advance, and sends each message to be sent to the producer device 12.
S503-A: the producer device 12 receives each message and sends each message separately to a Message Queue (MQ).
S504-A: for each message, the message processing device 11 obtains the state information of whether each message was successfully sent to the MQ; and judging whether the transaction to which the target message belongs is in a set target transaction set or not for each target message of which the state information is failed to be sent, and if so, executing the step S505-A.
S505-A: the target message is determined again to be a message included in the message to be sent, the target message is obtained from the database again, and the target message is sent to the producer device 12 again.
S506-A: the producer device 12 receives the target message and sends the target message to the MQ.
For convenience of understanding, the message sending process provided in the present application is described below with reference to a specific embodiment. Fig. 5B is a schematic diagram of a sixth message sending process provided in some embodiments, and as shown in fig. 5B, the process includes the following steps:
S501-B: for any transaction, the message processing device 11 obtains a message generated in the transaction process, identifies the type of the message, if the type of the message is in a pre-stored target type, stores the message in a database when the transaction is determined to be successful, and determines the message as a message to be sent.
Optionally, the status information of the message in the database may be configured as "not sent yet".
S502-B: the message processing device 11 obtains each message to be sent from the database in which the connection is established in advance, and sends each message to be sent to the producer device 12.
S503-B: the producer device 12 receives each message and sends each message separately to a Message Queue (MQ).
S504-B: for each message, the message processing device 11 obtains state information whether the message was successfully sent to the MQ. Executing the step S505-B aiming at the message that the state information is successfully sent; and executing the step S506-B aiming at the target message with the state information of failed transmission.
S505-B: the message processing apparatus 11 updates the status information of the message in the database to "transmission success", and no longer determines the message as a message included in the message to be transmitted.
S506-B: the message processing device 11 updates the status information of the target message in the database to "transmission failure", determines, for each target message whose status information is transmission failure, whether the transaction to which the target message belongs is in a set target transaction set, and if so, executes the step S507-B.
In one possible implementation, if the transaction to which the target message belongs is not located in the set target transaction set, the target message may not be determined as a message to be sent.
S507-B: the target message is determined again as a message included in the message to be sent, and the target message is obtained from the database again, and is sent to the producer device 12 again. The producer device 12 receives the target message and again sends the target message to the MQ.
It is understood that the step of S504-B may be repeated after the step of S507-B, and will not be described herein.
Example 2:
all the embodiments of the present application implement data acquisition, storage, use, processing, etc. in compliance with relevant regulations of national laws and regulations.
Based on the same technical concept, the present application provides a message sending method, which is applied to a message processing device, and fig. 6 shows a schematic diagram of a seventh message sending process provided in some embodiments, where the process includes the following steps:
s601: and acquiring each message to be sent from a database with connection established in advance, and sending each message to producer equipment to enable the producer equipment to send each message to a message queue MQ.
S602: acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
In a possible embodiment, before obtaining each message to be sent from the database of the pre-established connection, the method further includes:
aiming at any transaction, acquiring a message generated in the transaction process; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
In one possible embodiment, determining that the set transmission condition is satisfied includes:
and judging whether the transaction is successful, if so, determining that a set sending condition is met.
In a possible embodiment, after the obtaining of the message generated by the transaction in the transaction process and before the saving of the message in the database when the set sending condition is determined to be met, the method further comprises:
and identifying the type of the message aiming at the message generated in the transaction process, and if the type of the message is in a pre-stored target type, then performing the subsequent step of storing the message into the database when the message meets the set sending condition.
In one possible embodiment, the state information of whether each message was successfully sent to the MQ is determined by:
for each message sent to the producer device, acquiring the time when the producer device sends the message to the MQ and a failure time period when a sending failure occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
In a possible implementation manner, after obtaining the status information of whether each message is successfully sent to the MQ, before the target message is determined again to be the message included in the message to be sent for the target message whose status information is failed to be sent, the method further includes:
and judging whether the transaction to which the target message belongs is in a set target transaction set or not aiming at the target message, and if so, determining the target message as the message contained in the message to be sent again.
Based on the same technical concept, the present application provides a message sending apparatus, which is applied to a message processing device, and fig. 7 shows a schematic diagram of a first message sending apparatus provided in some embodiments, where the apparatus includes:
a first obtaining module 71, configured to obtain each message to be sent from a database with a connection established in advance, and send each message to a producer device, so that the producer device sends each message to a message queue MQ;
a second obtaining module 72, configured to obtain status information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
In a possible embodiment, the apparatus further comprises:
the determining module is used for acquiring a message generated in the transaction process aiming at any transaction; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
In a possible implementation manner, the determining module is specifically configured to determine whether the transaction is successful, and if so, determine that a set sending condition is met.
In a possible embodiment, the determining module is further configured to identify a type of a message generated during a transaction process for the transaction, and if the type of the message is located in a pre-stored target type, store the message into the database when it is determined that a set sending condition is met.
In a possible implementation manner, the second obtaining module is specifically configured to obtain, for each message sent to the producer device, a time when the producer device sends the message to the MQ and a failure time period during which a sending failure occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
In a possible implementation manner, the second obtaining module is further configured to, for the target message, determine whether a transaction to which the target message belongs is located in a set target transaction set, and if so, determine the target message as a message included in a message to be sent again.
Based on the same technical concept, the present application further provides an electronic device, and fig. 8 shows a schematic structural diagram of a first electronic device provided in some embodiments, and as shown in fig. 8, the electronic device includes: the system comprises a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82 and the memory 83 are communicated with each other through the communication bus 84;
the memory 83 has stored therein a computer program which, when executed by the processor 81, causes the processor 81 to perform the steps of:
acquiring each message to be sent from a database with a pre-established connection, and sending each message to a producer device, so that the producer device sends each message to a message queue MQ;
acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
In a possible embodiment, the processor 81 is further configured to, before acquiring each message to be sent from the database with a pre-established connection, acquire, for any transaction, a message generated by the transaction during the transaction; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
In a possible implementation manner, the processor 81 is specifically configured to determine whether the transaction is successful, and if so, determine that a set sending condition is satisfied.
In a possible embodiment, the processor 81 is further configured to, after the obtaining of the message generated in the transaction process during the transaction, identify a type of the message for the message generated in the transaction process during the transaction process before saving the message in the database when it is determined that the set sending condition is met, and if the type of the message is located in a target type saved in advance, perform a subsequent step of saving the message in the database when it is determined that the set sending condition is met.
In a possible implementation, the processor 81 is specifically configured to, for each message sent to the producer device, obtain a time when the producer device sends the message to the MQ and a failure time period during which a sending failure occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
In a possible implementation manner, the processor 81 is further configured to, after obtaining the state information of whether each message is successfully sent to the MQ, determine whether a transaction to which the target message belongs is located in a set target transaction set for the target message before determining the target message as a message included in a message to be sent again for the target message before the state information is the target message with which sending fails, and if yes, determine the target message as a message included in the message to be sent again.
Because the principle of the electronic device for solving the problem is similar to the message sending method in the foregoing embodiment, the implementation of the electronic device may refer to the implementation of the method, and repeated parts are not described again.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 82 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Based on the same technical concept, embodiments of the present application provide a computer-readable storage medium having stored therein a computer program executable by an electronic device, the program, when executed on the electronic device, causing the electronic device to perform the following steps:
acquiring each message to be sent from a database with a pre-established connection, and sending each message to a producer device, so that the producer device sends each message to a message queue MQ;
acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
In a possible embodiment, before obtaining each message to be sent from the database of the pre-established connection, the method further includes:
aiming at any transaction, acquiring a message generated in the transaction process; and when the message meets the set sending condition, storing the message into the database, and determining the message as the message to be sent.
In one possible embodiment, determining that the set transmission condition is satisfied includes:
and judging whether the transaction is successful, if so, determining that a set sending condition is met.
In a possible embodiment, after the obtaining of the message generated by the transaction in the transaction process and before the saving of the message in the database when the set sending condition is determined to be met, the method further comprises:
and identifying the type of the message aiming at the message generated in the transaction process, and if the type of the message is in a pre-stored target type, then performing the subsequent step of storing the message into the database when the message is determined to meet the set sending condition.
In one possible embodiment, the state information of whether each message was successfully sent to the MQ is determined by:
for each message sent to the producer device, acquiring the time when the producer device sends the message to the MQ and a failure time period when a sending failure occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
In a possible implementation manner, after obtaining the status information of whether each message is successfully sent to the MQ, before the target message whose status information is a target message whose sending fails is determined again as a message included in a message to be sent, the method further includes:
and judging whether the transaction to which the target message belongs is in a set target transaction set or not aiming at the target message, and if so, determining the target message as the message contained in the message to be sent again.
Because the principle of solving the problem of the computer-readable storage medium is similar to that of the message sending method, the implementation of the computer-readable storage medium can refer to the implementation of the card making method, and repeated details are not repeated.
The computer readable storage medium may be any available medium or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MO), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), solid State Disks (SSDs), etc.
Based on the same technical concept, the present application provides a computer program product, comprising: computer program code which, when run on a computer, causes the computer to carry out the method of any of the method embodiments described above as applied to an electronic device when executed.
In the above embodiments, all or part of the implementation may be implemented by software, hardware, firmware or any combination thereof, and all or part of the implementation may be in the form of a computer program product. The computer program product comprises one or more computer instructions which, when loaded and executed on a computer, cause the processes or functions described in the embodiments of the application to be performed in whole or in part.
Example 3:
all the embodiments of the present application implement data acquisition, storage, use, processing, etc. in compliance with relevant regulations of national laws and regulations.
Based on the same technical concept, the present application provides a message sending method, which is applied to a message processing device, and fig. 9 shows a schematic diagram of an eighth message sending process provided in some embodiments, where the process includes the following steps:
s901: and acquiring each message to be sent from a database with a connection established in advance, and sending each message to a message queue MQ.
S902: acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
The message sending method provided by the embodiment of the application is applied to electronic equipment, and the electronic equipment can be equipment such as a PC (personal computer), a mobile terminal and the like, and can also be equipment such as a server and the like.
Based on the same technical concept, the present application provides a message sending apparatus, and fig. 10 shows a schematic diagram of a second message sending apparatus provided by some embodiments, where the apparatus includes:
a third obtaining module 101, configured to obtain each message to be sent from a database in which a connection is pre-established, and send each message to a message queue MQ;
a fourth obtaining module 102, configured to obtain status information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
Based on the same technical concept, the present application further provides an electronic device, and fig. 11 shows a schematic structural diagram of a second electronic device provided in some embodiments, and as shown in fig. 11, the electronic device includes: the system comprises a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 are communicated with each other through the communication bus 114;
the memory 113 has stored therein a computer program which, when executed by the processor 111, causes the processor 111 to perform the steps of:
acquiring each message to be sent from a database with connection established in advance, and sending each message to a message queue MQ;
acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 112 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Based on the same technical concept, embodiments of the present application provide a computer-readable storage medium having stored therein a computer program executable by an electronic device, the program, when executed on the electronic device, causing the electronic device to perform the following steps:
acquiring each message to be sent from a database with a connection established in advance, and sending each message to a message queue MQ;
acquiring the state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
The computer readable storage medium may be any available medium or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MO), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), solid State Disks (SSDs), etc.
Based on the same technical concept, the present application provides a computer program product, comprising: computer program code which, when run on a computer, causes the computer to carry out the method of transmitting as described above for any of the method embodiments applied to an electronic device when executed.
In the above embodiments, the implementation may be realized in whole or in part by software, hardware, firmware, or any combination thereof, and may be realized in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions which, when loaded and executed on a computer, cause the processes or functions described in the embodiments of the application to be performed in whole or in part.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, 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 specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (24)

1. A messaging system, the system comprising:
the message processing equipment is used for acquiring each message to be sent from a database with pre-established connection and sending each message to the producer equipment;
the producer device is used for receiving each message and sending each message to a message queue MQ;
the message processing device is further configured to obtain state information whether each message is successfully sent to the MQ; for the target message with the state information of failed transmission, determining the target message as the message contained in the message to be transmitted again, acquiring the target message from the database again, and transmitting the target message to the producer equipment again;
the producer device is further configured to receive the target message and send the target message to the MQ.
2. The system of claim 1, wherein the message processing device is further configured to, for any transaction, obtain a message generated during the transaction; and when the message meets the set sending condition, storing the message into the database, and determining the message as the message to be sent.
3. The system according to claim 2, wherein the message processing device is specifically configured to determine whether the transaction is successful, and if so, determine that a set sending condition is satisfied.
4. The system of claim 2, wherein the message processing device is further configured to identify a type of the message generated during the transaction, and store the message in the database if the type of the message is in a pre-stored target type.
5. The system according to any of claims 1 to 4, wherein the message processing device is specifically configured to, for each message sent to the producer device, obtain a time when the producer device sends the message to the MQ and a failure time period during which a sending failure occurs, and if the time is within the failure time period, determine the status information of the message as a sending failure.
6. The system as in any of claims 1-4, wherein the producer device is further configured to generate state information as to whether each message was successfully sent to the MQ;
the message processing device is specifically configured to acquire the status information generated by the producer device.
7. The system according to any one of claims 1 to 4, wherein the message processing device is further configured to determine, for the target message, whether a transaction to which the target message belongs is in a set target transaction set, and if so, determine the target message as a message included in the message to be sent again.
8. A method for sending a message, the method comprising:
acquiring each message to be sent from a database with a pre-established connection, and sending each message to a producer device, so that the producer device sends each message to a message queue MQ;
acquiring the state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
9. The method of claim 8, wherein before the obtaining each message to be sent from the database of pre-established connections, the method further comprises:
aiming at any transaction, acquiring a message generated in the transaction process; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
10. The method of claim 9, wherein determining that a set transmission condition is satisfied comprises:
and judging whether the transaction is successful, if so, determining that the set sending condition is met.
11. The method of claim 9, wherein after obtaining the message generated by the transaction during the transaction, and before saving the message to the database when it is determined that the set sending condition is satisfied, the method further comprises:
and identifying the type of the message aiming at the message generated in the transaction process, and if the type of the message is in a pre-stored target type, then performing the subsequent step of storing the message into the database when the message is determined to meet the set sending condition.
12. The method according to any of the claims 8 to 11, wherein the state information of whether each message was successfully transmitted to the MQ is determined by:
for each message sent to the producer device, acquiring the time when the producer device sends the message to the MQ and a fault time period when a sending fault occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
13. The method as claimed in any of claims 8-11, wherein after obtaining the status information of whether each message is successfully transmitted to the MQ, and before the target message is determined to be a message included in the message to be transmitted again for the target message whose status information is failed to be transmitted, the method further comprises:
and judging whether the transaction to which the target message belongs is in a set target transaction set or not aiming at the target message, and if so, determining the target message as the message contained in the message to be sent again.
14. A method for sending a message, the method comprising:
acquiring each message to be sent from a database with a connection established in advance, and sending each message to a message queue MQ;
acquiring state information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
15. A message transmission apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring each message to be sent from a database with a pre-established connection, and sending each message to producer equipment, so that the producer equipment sends each message to a message queue MQ;
a second obtaining module, configured to obtain status information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the producer device again, so that the producer device transmits the target message to the MQ.
16. The apparatus of claim 15, further comprising:
the determining module is used for acquiring a message generated in the transaction process aiming at any transaction; and when the set sending condition is determined to be met, storing the message into the database, and determining the message as the message to be sent.
17. The apparatus according to claim 16, wherein the determining module is specifically configured to determine whether the transaction is successful, and if so, determine that a set sending condition is satisfied.
18. The apparatus of claim 16, wherein the determining module is further configured to identify a type of the message generated during the transaction, and if the type of the message is located in a pre-stored target type, store the message in the database when it is determined that the set sending condition is met.
19. The apparatus according to any of the claims 15 to 18, wherein the second obtaining module is specifically configured to, for each message sent to the producer device, obtain a time when the producer device sends the message to the MQ and a failure time period during which a sending failure occurs;
and if the time is within the fault time period, determining the state information of the message as failure in sending.
20. The apparatus according to any one of claims 15 to 18, wherein the second obtaining module is further configured to determine, for the target message, whether a transaction to which the target message belongs is in a set target transaction set, and if so, determine the target message as a message included in a message to be sent again.
21. A message transmission apparatus, characterized in that the apparatus comprises:
the third acquisition module is used for acquiring each message to be sent from a database with a connection established in advance and sending each message to the message queue MQ;
a fourth obtaining module, configured to obtain status information of whether each message is successfully sent to the MQ; and aiming at the target message with the state information of failed transmission, re-determining the target message as the message contained in the message to be transmitted, acquiring the target message from the database again, and transmitting the target message to the MQ again.
22. An electronic device, characterized in that the electronic device comprises at least a processor and a memory, the processor being adapted to carry out the steps of the message sending method according to any of claims 8 to 14 when executing a computer program stored in the memory.
23. A computer-readable storage medium, characterized in that it stores a computer program which, when being executed by a processor, carries out the steps of the message sending method according to one of claims 8 to 14.
24. A computer program product, the computer program product comprising: computer program code for causing a computer to carry out the steps of the method for sending a message according to any of claims 8 to 14 when said computer program code is run on a computer.
CN202210957450.4A 2022-08-10 2022-08-10 Message sending system, method and device, electronic equipment and storage medium Pending CN115237637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210957450.4A CN115237637A (en) 2022-08-10 2022-08-10 Message sending system, method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210957450.4A CN115237637A (en) 2022-08-10 2022-08-10 Message sending system, method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115237637A true CN115237637A (en) 2022-10-25

Family

ID=83679993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210957450.4A Pending CN115237637A (en) 2022-08-10 2022-08-10 Message sending system, method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115237637A (en)

Similar Documents

Publication Publication Date Title
CN108076098B (en) Service processing method and system
CN109788068B (en) Heartbeat state information reporting method, device and equipment and computer storage medium
CN111355600B (en) Main node determining method and device
CN112181677A (en) Service processing method and device, storage medium and electronic device
CN114461415A (en) Message data processing method and device, computer equipment and storage medium
CN109104292B (en) Update deployment processing method, related device, and computer-readable storage medium
CN115237637A (en) Message sending system, method and device, electronic equipment and storage medium
CN115390939B (en) Service processing method and system
CN115037653B (en) Service flow monitoring method, device, electronic equipment and storage medium
CN111367934A (en) Data consistency checking method, device, server and medium
CN115543837A (en) Software testing method and device, electronic equipment and storage medium
CN110113187B (en) Configuration updating method and device, configuration server and configuration system
CN115033927A (en) Method, device, equipment and medium for detecting data integrity
CN114816866A (en) Fault processing method and device, electronic equipment and storage medium
CN111629054B (en) Message processing method, device and system, electronic equipment and readable storage medium
CN112948195A (en) Interface testing method and device, electronic equipment and storage medium
CN110166528B (en) Method and device for preventing node change notification from being lost and computer equipment
CN112181686A (en) Data processing method, device and system, electronic equipment and storage medium
CN111858100A (en) BMC message transmission method and related device
CN113676894A (en) Service processing method and device
CN114244797A (en) Message processing method, device, system, equipment and medium
CN113806069B (en) Nuclear power station system interaction method and device, peripheral system and storage medium
CN114189934B (en) Repeated paging determining method, device, equipment and medium
CN117573396B (en) Distributed workflow event processing method, device and medium
CN117762652A (en) Distributed transaction processing method and device based on message middleware

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