CN114244899A - Message transmission method and device and readable storage medium - Google Patents
Message transmission method and device and readable storage medium Download PDFInfo
- Publication number
- CN114244899A CN114244899A CN202111462448.1A CN202111462448A CN114244899A CN 114244899 A CN114244899 A CN 114244899A CN 202111462448 A CN202111462448 A CN 202111462448A CN 114244899 A CN114244899 A CN 114244899A
- Authority
- CN
- China
- Prior art keywords
- message
- original
- original message
- database
- receiver
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 230000005540 biological transmission Effects 0.000 title abstract description 21
- 238000004590 computer program Methods 0.000 claims description 12
- 238000002716 delivery method Methods 0.000 claims description 9
- 238000012790 confirmation Methods 0.000 claims description 7
- 230000002159 abnormal effect Effects 0.000 abstract description 5
- 238000009825 accumulation Methods 0.000 abstract description 4
- 238000013500 data storage Methods 0.000 abstract description 3
- 238000012545 processing Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a message transmission method, a device and a readable storage medium, which relate to the field of electronic information, and are characterized in that a message sender is controlled to send an original message to an intermediate component, the intermediate component forwards the original message to a message middleware, the original message is stored in a database, the message receiver is judged whether to receive the original message, if not, the original message is sent to the message receiver through the database, compared with the prior method of directly using the message middleware to transmit the message, even if the message middleware fails, network fluctuation and other abnormal conditions are met, the original message can be sent to the message receiver through the database, thereby preventing the loss or the flow failure of the message, the storage capacity of the database is far larger than the data storage capacity of the message middleware, when the traffic flow is large, the original message can be sent to the message receiver through the database, thereby relieving the accumulation of the original message in the message middleware, the timely consumption of the message and the reliability of the message transmission are ensured.
Description
Technical Field
The present application relates to the field of electronic information, and in particular, to a message transmission method, device and readable storage medium.
Background
In recent years, with the rapid development of internet information technology, information transfer technology is applied to the internet, and particularly in the internet shopping, the demand for smooth and reliable message circulation is very high.
The current internet information transmission technology is generally to transmit the information to the message middleware through the message sender and then forward the information to the message receiver, so that no safeguard measure is provided, if abnormal conditions such as message middleware failure, network fluctuation and the like are met, the message circulation may be interrupted, the normal operation of a service line is affected, the problems of message loss or message circulation failure, which causes incorrect feedback and the like, are caused, and the working efficiency of the message middleware is limited, and under the condition of large service flow, the problems of message accumulation and the like also exist.
In view of the above-mentioned technologies, a message delivery method capable of improving the reliability of message delivery is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a message transmission method so as to solve the problem of low message transmission reliability.
In order to solve the above technical problem, the present application provides a message delivery method, including:
the control message sender sends the original message to an intermediate component, the intermediate component forwards the original message to a message middleware so that the message middleware can send the original message to a message receiver, and the original message is stored in a database;
judging whether the message receiver receives the original message;
if not, the original message in the database is sent to the message receiver.
Preferably, the determining whether the message receiver receives the original message includes:
judging whether a receiving success signal sent by the message receiving party is received, wherein the receiving success signal is a feedback signal generated after the message receiving party receives the original message;
if yes, representing that the message receiver receives the original message;
if not, the message receiver is characterized not to receive the original message.
Preferably, the method further comprises:
when the original message is stored in the database, setting the state of the original message as a state to be confirmed;
after receiving the successful receiving signal corresponding to the original message, changing the state of the original message from a state to be confirmed to a confirmed state;
and sending the original message in the state to be confirmed in the database to the message receiver every a first preset time.
Preferably, the method further comprises:
and if the times of sending the original message in the state to be confirmed to the message receiver in the database reaches a threshold value, stopping sending the original message to the message receiver, and changing the state of the original message from the state to be confirmed to a confirmation failure state.
Preferably, the method further comprises:
and clearing all the original messages reaching the set time threshold in the database at intervals of second preset time.
Preferably, the storing the original message to a database comprises:
putting the original message into a thread pool and/or a buffer area; storing the original message processed by the thread pool and/or the buffer area into the database;
receiving the reception success signal transmitted by the message receiver includes:
placing the reception success signal in the thread pool and/or the buffer;
storing the reception success signal processed by the thread pool and/or the buffer in the database.
Preferably, the sending of the control message to the intermediate component by the control message sender, the forwarding of the original message to the message middleware by the intermediate component, and the storing of the original message to the database includes:
and controlling the message sender to send the original message to the intermediate component in an asynchronous mode, forwarding the original message to the message middleware by the intermediate component, and storing the original message to the database.
In order to solve the above problem, the present application further provides a message delivery apparatus, including:
the control module is used for controlling the message sender to send the original message to the intermediate component, then the intermediate component forwards the original message to the message middleware so that the message middleware can send the original message to the message receiver, and the original message is stored in the database;
the judging module is used for judging whether the message receiver receives the original message or not and starting the sending module when the judging result is negative;
and the sending module is used for sending the original message in the database to the message receiver.
Preferably, the apparatus further comprises:
the setting module is used for setting the state of the original message as a state to be confirmed when the original message is stored in the database;
a modification module, configured to change a state of the original message from a state to be confirmed to a confirmed state after receiving the successful reception signal corresponding to the original message;
and the periodic sending module is used for sending the original message in the state to be confirmed in the database to the message receiver every other first preset time.
Preferably, the apparatus further comprises:
and the stopping module stops sending the original message to the message receiver if the frequency of sending the original message in the state to be confirmed to the message receiver in the database reaches a threshold value, and changes the state of the original message from the state to be confirmed to a confirmation failure state.
Preferably, the apparatus further comprises:
and the clearing module is used for clearing all the original messages reaching the set time threshold value in the database every other second preset time.
To solve the above problem, the present application further provides a message delivery apparatus, which includes a memory for storing a computer program;
a processor for implementing the steps of the message passing method as described above when executing the computer program.
To solve the above problem, the present application further provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor implements the steps of the message delivery method as described above.
The message transmission method provided by the application sends the original message to the intermediate component by the control message sender, and then the intermediate component forwards the original message to the message middleware, and stores the original message in the database, by judging whether the message receiver receives the original message, if not, the original message is sent to the message recipient via the database, rather than using the messaging middleware directly as before, even if the abnormal conditions of message middleware failure, network fluctuation and the like are met, the original message can be sent to the message receiver through the database, the loss or the circulation failure of the message is prevented, the storage capacity of the database is far larger than the data storage capacity of the message middleware, when the service flow is large, the original message can be sent to the message receiver through the database, so that the accumulation of the original message is relieved, and the reliability of message transmission is ensured.
The message transmission device and the readable storage medium provided by the application correspond to the method, and the beneficial effects are the same.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a message delivery method according to an embodiment of the present application;
FIG. 2 is a block diagram of a preferred messaging system provided by an embodiment of the present application;
fig. 3 is a schematic diagram of a message passing apparatus according to an embodiment of the present application;
fig. 4 is a block diagram of a messaging device according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a message transmission method so as to solve the problem of low message transmission reliability.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a flowchart of a message delivery method according to an embodiment of the present application, and as shown in fig. 1, the method includes:
s10: the control message sender sends the original message to the intermediate component, and the intermediate component forwards the original message to the message middleware so that the message middleware can send the original message to the message receiver and store the original message in a database;
it should be noted that the intermediate component, which is a component newly proposed in the present application for use in a messaging system, includes a database and a control device.
In practical applications, a message sender is a party generating an original message, and a message receiver is a party receiving the original message, for example, in online shopping, whether goods are delivered is determined, and when a user determines that the goods are delivered, a merchant is the message sender, and a buyer is the message receiver. It should be noted that the original message may be sent by one message sender or may be combined information sent by multiple message senders, where the original message may be sent to only one message receiver or may be sent to multiple message receivers simultaneously, and considering that there are multiple message senders and multiple message receivers, the preferred scheme performs information processing by providing one message sending interface and one message receiving interface, where the sending and receiving modes of the original message are not limited.
It should be noted that the message middleware is supporting software for providing synchronous or asynchronous and reliable message transmission for the application system in the network environment based on the queue and message passing technology. The message middleware utilizes an efficient and reliable message transfer mechanism for platform-independent data communication and performs distributed integration based on data communication. By providing a messaging and message queuing model, it can extend inter-process communication in a distributed environment. In the present embodiment, the specific type of message middleware is not limited.
In this embodiment, the type of the database is not limited, but considering various factors such as the operation speed, the cost, i.e., migration, etc., the MySQL database is preferably used, and has the advantages of high operation speed, low cost, simple operation, and convenience in migration. In this embodiment, the sending of the original message to the message middleware and the sending of the original message to the database may be synchronous sending or asynchronous sending, and the sending sequence is not limited.
S11: judging whether the message receiver receives the original message, if not, entering S12;
it should be noted that, in this embodiment, the method for determining whether the message receiver receives the original message is not limited, and for example, the message sender may inquire the message receiver, or the message receiver may feedback that the message receiver has received the message.
S12: the original message in the database is sent to the message recipient.
It should be noted that, after detecting that the message receiver does not receive the original message, the original message is reissued by the database, in this embodiment, the sending times and sending time of the original message in the database are not limited, for example, the original message may be sent to the message receiver that does not receive the original message once at intervals until the message receiver is confirmed to receive the original message.
In practical applications, the above steps are all performed by the control of the control component, the specific form, i.e. type, of the control component is not limited in this embodiment, and a distributed control system is generally preferred in consideration of practical application situations. In this embodiment, the sending of the message may be a single sending or a batch sending, and is not limited herein.
In the message transmission method provided by this embodiment, the message sender is controlled to send the original message to the message middleware, and the original message is stored in the database, and by judging whether the message receiver receives the original message, if not, the original message is sent to the message receiver through the database, and compared with the previous method in which the message middleware is directly used for message transmission, even if the message receiver encounters abnormal conditions such as message middleware failure and network fluctuation, the original message can be sent to the message receiver through the database, so that loss or failure in message circulation is prevented, and the storage capacity of the database is much greater than that of the message middleware.
In the above embodiment, how to determine whether the message receiver receives the original message is not limited, a preferred scheme is proposed herein, and determining whether the message receiver receives the original message includes:
judging whether a receiving success signal sent by a message receiving party is received, wherein the receiving success signal is a feedback signal generated after the message receiving party receives an original message;
if yes, representing that the message receiver receives the original message;
if not, the representation message receiver does not receive the original message.
It should be noted that there are various ways to determine whether to receive the successful reception signal sent by the message receiver, for example, a preset time may be set, and the successful reception signal sent by the message receiver is not received within the preset time after the message sender sends the message, that is, it may be determined that the message receiver does not send the successful reception signal, or one total of A, B, C original messages are sent in sequence, and the successful reception signals of a and C are received, that is, it may be determined that the successful reception signal of B is not received.
In this embodiment, how to judge that the message receiver receives the original message is limited, and the successful reception signal is a feedback signal generated after the message receiver receives the original message by judging whether to receive a successful reception signal sent by the message receiver, so that other components are not needed to confirm whether the message receiver receives the original message, and the accuracy of the information is ensured and the efficiency of information transmission is also ensured through the feedback of the message receiver.
Considering that there may be multiple original messages simultaneously in the database, some of which are received by the message receiver and others of which are not received by the message receiver, in order to accurately send the original message which is not received by the message receiver, a preferred scheme is proposed herein, in which the method further includes:
when the original message is stored in the database, setting the state of the original message as a state to be confirmed;
after receiving a successful receiving signal corresponding to the original message, changing the state of the original message from a state to be confirmed to a confirmed state;
and sending the original message in the state to be confirmed in the database to a message receiver every a first preset time.
It should be noted that the state of the data here may be set by attaching an identifier, or may be classified by tagging through a database, where how to set the state of the original message is not limited, the number of times the original message in the state to be confirmed is sent to the message recipient is not limited, and the specific time of the first preset time is not limited.
In the embodiment, the original messages in the database are subjected to state classification, the undetermined original messages are set to be in the confirmed state, the confirmed original messages are set to be in the confirmed state, and then the original messages to be confirmed are periodically sent to the message receiver.
In view of the problem of database resource utilization in practical application, a preferred solution is proposed in this embodiment, and the method further includes:
and if the times of sending the original message in the state to be confirmed in the database to the message receiver reach the threshold value, stopping sending the original message to the message receiver, and changing the state of the original message from the state to be confirmed to a confirmation failure state.
It should be noted that, in this embodiment, a threshold value exists for the number of times that the original message in the state to be confirmed is sent to the message recipient, and a specific numerical value of the threshold value is not limited herein. After the sending times reach the threshold value, the original message is confirmed to be failed to send, the state is modified into the state of failure confirmation, and the timeliness of part of messages is considered, so that the situation that the original message is sent meaninglessly is avoided, for example, if the order information is not confirmed for many times, the order information is regarded as the failure of confirmation, the sending scheme of the original message is reasonably optimized, and the efficiency of processing the original message in the database is enhanced.
In practical application, because the capacity of the database is limited and the existence value of the original message which is confirmed and fails to be confirmed is not high, a preferred scheme is proposed, and the method further comprises the following steps:
and clearing the original message reaching the set time threshold value in the database every second preset time.
With reference to the foregoing embodiment, fig. 2 is a structural diagram of a preferred message delivery system according to an embodiment of the present application, and as shown in fig. 2, a message sender sends an original message to an intermediate component, the intermediate component forwards the original message to a message middleware, stores the original message in a database, and then, a message receiver feeds back a reception success signal to a control component to determine whether the message receiver receives the original message, so that the control component periodically sends the original message to be determined from the database to the message receiver, and periodically clears the original message that reaches a time threshold, that is, the determined or failed to be determined.
It should be noted that, in this embodiment, specific durations of the second preset time and the time threshold are not limited, and by removing all meaningless original messages reaching the set time threshold, considering that the old data also has a certain usability, a preferred scheme may establish a database for recovering the old data to recover the original messages that have been confirmed and failed to be confirmed.
The scheme provided by the embodiment avoids the waste of the storage amount in the database, and optimizes the storage amount of the original message to be confirmed in the whole database.
In the above embodiments, the method for storing the original message in the database and acquiring the reception success signal is not limited, and a preferred scheme is proposed herein, where the storing the original message in the database includes:
putting the original message into a thread pool and/or a buffer area;
storing the original message processed by the thread pool and/or the buffer area into a database;
receiving the reception success signal transmitted by the message receiver includes:
putting the successful receiving signal into a thread pool and/or a buffer area;
the reception success signal processed by the thread pool and/or the buffer is stored in the database.
The thread pool is a multithread processing form, adding tasks to a queue in the processing process, then automatically starting the tasks after creating threads, and the buffer is a memory for temporarily placing output or input data.
In practical application, because the data flow rate in the transaction service scene is relatively large, the throughput capacity of the system can be greatly improved by adopting the thread pool and the buffer area, so that the system can smoothly process the service with relatively large flow rate.
In the foregoing embodiment, a specific manner for sending the original message to the message middleware by the message sender and storing the original message in the database is not limited, and a preferred scheme is provided herein, where the control message sender sends the original message to the intermediate component, and the intermediate component forwards the original message to the message middleware so that the message middleware sends the original message to the message receiver, and the storing the original message in the database includes:
and controlling a message sender to send the original message to the intermediate component in an asynchronous mode, forwarding the original message to the message middleware by the intermediate component, and storing the original message to a database.
It should be noted that, since data reading requires time, when performing synchronous processing, two ports simultaneously read data of an original message sent by a message sender, which may affect performance of message sending, and since reading in this embodiment is asynchronous with storing and sending operations, performance of message sending may not be affected.
In the foregoing embodiments, detailed descriptions are given for a message delivery method, and the present application also provides embodiments corresponding to the message delivery apparatus. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 3 is a schematic diagram of a message delivery apparatus according to an embodiment of the present application, and as shown in fig. 3, the message delivery apparatus includes:
the control module 10 is used for controlling the message sender to send the original message to the intermediate component, and then the intermediate component forwards the original message to the message middleware, so that the message middleware sends the original message to the message receiver and stores the original message in the database;
the judging module 11 is used for judging whether the message receiver receives the original message or not, and starting the sending module when the judging result is negative;
and a sending module 12, configured to send the original message in the database to a message recipient.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
Preferably, the apparatus further comprises:
the setting module is used for setting the state of the original message as the state to be confirmed when the original message is stored in the database;
the modification module is used for changing the state of the original message from the state to be confirmed to the confirmed state after receiving the receiving success signal corresponding to the original message;
and the periodic sending module is used for sending the original message in the state to be confirmed in the database to a message receiver every other first preset time.
Preferably, the apparatus further comprises:
and the stopping module stops sending the original message to the message receiver if the number of times that the original message in the state to be confirmed in the database is sent to the message receiver reaches a threshold value, and changes the state of the original message from the state to be confirmed to a confirmation failure state.
Preferably, the apparatus further comprises:
and the clearing module is used for clearing all the original messages reaching the set time threshold in the database at intervals of second preset time.
The message transmission device provided by this embodiment includes a control module 10, a judgment module 11, and a transmission module 12, and transmits an original message to an intermediate component by controlling a message transmitter, and then the intermediate component forwards the original message to a message middleware, and stores the original message to a database, and by judging whether a message receiver receives the original message, if not, transmits the original message to the message receiver through the database, and compared with the previous method that directly transmits the message by using the message middleware, even if an abnormal condition such as a message middleware failure, a network fluctuation, etc. is encountered, the original message can be transmitted to the message receiver through the database, thereby preventing the loss or the flow failure of the message, and the storage amount of the database is much larger than the data storage amount of the message middleware, and when the traffic flow is large, the original message can be transmitted to the message receiver through the database, therefore, the accumulation of the original message is relieved, and the reliability of message transmission is ensured.
Fig. 4 is a block diagram of a messaging device according to another embodiment of the present application, and as shown in fig. 4, the messaging device includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the messaging method as mentioned in the above embodiments when executing the computer program.
The message delivery device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the message passing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, data involved in messaging methods, and the like.
In some embodiments, the messaging device may also include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is not intended to be limiting of message delivery devices and may include more or fewer components than those shown.
The message transmission device provided by the embodiment of the application comprises a memory and a processor, and when the processor executes a program stored in the memory, the following method can be realized: the above embodiments refer to a messaging method.
Since the embodiment of the message passing apparatus corresponds to the above method embodiment, the beneficial effects are the same, and are not described herein again.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
A message delivery method, a message delivery device and a readable storage medium provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A messaging method for use in a messaging system including an intermediary component, the method comprising:
the control message sender sends the original message to the intermediate component, the intermediate component forwards the original message to the message middleware so that the message middleware can send the original message to the message receiver, and the original message is stored in a database;
judging whether the message receiver receives the original message;
if not, the original message in the database is sent to the message receiver.
2. The message delivery method as claimed in claim 1, wherein said determining whether the message receiver receives the original message comprises:
judging whether a receiving success signal sent by the message receiving party is received, wherein the receiving success signal is a feedback signal generated after the message receiving party receives the original message;
if yes, representing that the message receiver receives the original message;
if not, the message receiver is characterized not to receive the original message.
3. The messaging method of claim 2, further comprising:
when the original message is stored in the database, setting the state of the original message as a state to be confirmed;
after receiving the successful receiving signal corresponding to the original message, changing the state of the original message from a state to be confirmed to a confirmed state;
and sending the original message in the state to be confirmed in the database to the message receiver every a first preset time.
4. The messaging method of claim 3, further comprising:
and if the times of sending the original message in the state to be confirmed to the message receiver in the database reaches a threshold value, stopping sending the original message to the message receiver, and changing the state of the original message from the state to be confirmed to a confirmation failure state.
5. The messaging method of claim 4, further comprising:
and clearing all the original messages reaching the set time threshold in the database at intervals of second preset time.
6. The messaging method of any one of claims 2 to 5, wherein the storing the original message to a database comprises:
putting the original message into a thread pool and/or a buffer area;
storing the original message processed by the thread pool and/or the buffer area into the database;
receiving the reception success signal transmitted by the message receiver includes:
placing the reception success signal in the thread pool and/or the buffer;
storing the reception success signal processed by the thread pool and/or the buffer in the database.
7. The message delivery method of any one of claims 1 to 5, wherein the controlling the message sender to send the original message to the intermediate component, and the intermediate component forwards the original message to the message middleware so that the message middleware sends the original message to the message receiver, and stores the original message in the database comprises:
and controlling the message sender to send the original message to an intermediate component in an asynchronous mode, forwarding the original message to the message middleware by the intermediate component, and storing the original message to the database.
8. A messaging apparatus, comprising:
the control module is used for controlling a message sender to send an original message to the intermediate component, then the intermediate component forwards the original message to a message middleware so that the message middleware can send the original message to a message receiver, and the intermediate component stores the original message to a database;
the judging module is used for judging whether the message receiver receives the original message or not and starting the sending module when the judging result is negative;
and the sending module is used for sending the original message in the database to the message receiver.
9. A messaging appliance comprising a memory for storing a computer program;
a processor for implementing the steps of the messaging method as claimed in any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the messaging method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111462448.1A CN114244899B (en) | 2021-12-02 | 2021-12-02 | Message transmission method, device and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111462448.1A CN114244899B (en) | 2021-12-02 | 2021-12-02 | Message transmission method, device and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114244899A true CN114244899A (en) | 2022-03-25 |
CN114244899B CN114244899B (en) | 2024-05-17 |
Family
ID=80752824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111462448.1A Active CN114244899B (en) | 2021-12-02 | 2021-12-02 | Message transmission method, device and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114244899B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120023116A1 (en) * | 2010-07-23 | 2012-01-26 | Oracle International Corporation | System and method for conversion of jms message data into database transactions for application to multiple heterogeneous databases |
CN104731912A (en) * | 2015-03-24 | 2015-06-24 | 浪潮集团有限公司 | Message transmission method and device for message middleware MQ |
CN105871959A (en) * | 2015-01-22 | 2016-08-17 | 阿里巴巴集团控股有限公司 | Message delivery method, system and device |
CN107592215A (en) * | 2017-08-31 | 2018-01-16 | 郑州云海信息技术有限公司 | A kind of method for managing message-oriented middleware |
CN107870982A (en) * | 2017-10-02 | 2018-04-03 | 深圳前海微众银行股份有限公司 | Data processing method, system and computer-readable recording medium |
CN108009027A (en) * | 2017-11-23 | 2018-05-08 | 北京百度网讯科技有限公司 | Implementation method, device, equipment and the storage medium of queue message uniformity |
CN109451032A (en) * | 2018-11-20 | 2019-03-08 | 上海联寓智能科技有限公司 | A kind of messaging system |
CN111049729A (en) * | 2019-11-29 | 2020-04-21 | 苏州浪潮智能科技有限公司 | Persistent message transmission method and device |
CN111127088A (en) * | 2019-12-17 | 2020-05-08 | 深圳前海环融联易信息科技服务有限公司 | Method, device, computer equipment and storage medium for realizing final consistency |
CN111666162A (en) * | 2020-04-30 | 2020-09-15 | 平安科技(深圳)有限公司 | Distributed message transmission method, device, computer equipment and storage medium |
CN112702371A (en) * | 2019-10-22 | 2021-04-23 | 深圳市茁壮网络股份有限公司 | Message sending method and device and intelligent terminal |
-
2021
- 2021-12-02 CN CN202111462448.1A patent/CN114244899B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120023116A1 (en) * | 2010-07-23 | 2012-01-26 | Oracle International Corporation | System and method for conversion of jms message data into database transactions for application to multiple heterogeneous databases |
CN105871959A (en) * | 2015-01-22 | 2016-08-17 | 阿里巴巴集团控股有限公司 | Message delivery method, system and device |
CN104731912A (en) * | 2015-03-24 | 2015-06-24 | 浪潮集团有限公司 | Message transmission method and device for message middleware MQ |
CN107592215A (en) * | 2017-08-31 | 2018-01-16 | 郑州云海信息技术有限公司 | A kind of method for managing message-oriented middleware |
CN107870982A (en) * | 2017-10-02 | 2018-04-03 | 深圳前海微众银行股份有限公司 | Data processing method, system and computer-readable recording medium |
CN108009027A (en) * | 2017-11-23 | 2018-05-08 | 北京百度网讯科技有限公司 | Implementation method, device, equipment and the storage medium of queue message uniformity |
CN109451032A (en) * | 2018-11-20 | 2019-03-08 | 上海联寓智能科技有限公司 | A kind of messaging system |
CN112702371A (en) * | 2019-10-22 | 2021-04-23 | 深圳市茁壮网络股份有限公司 | Message sending method and device and intelligent terminal |
CN111049729A (en) * | 2019-11-29 | 2020-04-21 | 苏州浪潮智能科技有限公司 | Persistent message transmission method and device |
CN111127088A (en) * | 2019-12-17 | 2020-05-08 | 深圳前海环融联易信息科技服务有限公司 | Method, device, computer equipment and storage medium for realizing final consistency |
CN111666162A (en) * | 2020-04-30 | 2020-09-15 | 平安科技(深圳)有限公司 | Distributed message transmission method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114244899B (en) | 2024-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7984161B2 (en) | Optimizing mobile device synchronization with multiple data sources | |
US20130124643A1 (en) | System and method for communication thread management | |
CN111008075A (en) | Load balancing system, method, device, equipment and medium | |
US8386559B2 (en) | Method for exchanging requests between the computer application of a mobile terminal and an instantaneous messaging server | |
CN104967537A (en) | Alarm information pushing method and device | |
CN112527530B (en) | Message processing method, device, apparatus, storage medium and computer program product | |
CN104935612A (en) | Data processing method and server | |
WO2017173449A1 (en) | Technologies for predicting availability status changes | |
CN114095438A (en) | Data transmission method, device, equipment, storage medium and computer program product | |
CN113064740A (en) | Message processing method and device | |
CN112291325A (en) | Message processing method and device and computer system | |
CN113535420B (en) | Message processing method and device | |
CN114244899A (en) | Message transmission method and device and readable storage medium | |
CN112448882B (en) | Mail service method and device for enterprise-level platform | |
CN112948081A (en) | Method, device and equipment for processing task in delayed mode and storage medium | |
CN114567536B (en) | Abnormal data processing method, device, electronic equipment and storage medium | |
CN111064639A (en) | Service state announcement method, device, equipment and storage medium | |
CN115760317A (en) | Business order processing method and device, computer equipment and storage medium | |
CN114301857A (en) | Water meter communication method and device based on Internet of things | |
CN113590287A (en) | Task processing method, device, equipment, storage medium and scheduling system | |
CN112882985A (en) | Data transmission system, method, device and medium | |
US9282184B2 (en) | Managing and storing electronic messages during recipient unavailability | |
CN112488462A (en) | Unified pushing method, device and medium for workflow data | |
CN106656729B (en) | A kind of method and device sending information | |
CN113612679B (en) | Message verification method and device, electronic equipment and storage medium |
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 |