CN108965164A - Service request repeating method, device and readable storage medium storing program for executing based on message queue - Google Patents

Service request repeating method, device and readable storage medium storing program for executing based on message queue Download PDF

Info

Publication number
CN108965164A
CN108965164A CN201710347403.7A CN201710347403A CN108965164A CN 108965164 A CN108965164 A CN 108965164A CN 201710347403 A CN201710347403 A CN 201710347403A CN 108965164 A CN108965164 A CN 108965164A
Authority
CN
China
Prior art keywords
service request
message queue
message
service
queue
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
Application number
CN201710347403.7A
Other languages
Chinese (zh)
Other versions
CN108965164B (en
Inventor
董志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710347403.7A priority Critical patent/CN108965164B/en
Publication of CN108965164A publication Critical patent/CN108965164A/en
Application granted granted Critical
Publication of CN108965164B publication Critical patent/CN108965164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/12Payment architectures specially adapted for electronic shopping systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/1874Buffer management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/1887Scheduling and prioritising arrangements

Abstract

The application discloses a kind of service request repeating method, device and readable storage medium storing program for executing based on message queue.This method comprises: sending the service request in service message queue;And when not receiving the response message of the service request in a preset time threshold or detecting that the service request sends failure, according to preset configuration file chain, the service request is put into multiple first retried in message queue and is retried in message queue;Wherein, the multiple message queue that retries is with different message expired times;The configuration file chain is for determining the service request in the multiple routing order retried in message queue.This method can be realized the repeating transmission request of different frequency, and can reduce the load of service server and improve information security.

Description

Service request repeating method, device and readable storage medium storing program for executing based on message queue
Technical field
The present invention relates to applications of computer network technologies, in particular to a kind of service request based on message queue Repeating method, device, equipment and readable storage medium storing program for executing.
Background technique
In electric business system, communicated between multiple system platforms, after first time communication failure, it may be necessary to Interval different time frequency initiation retries.Such as account is counter looks into business.Counter look into of account refers to that user supplements with money in online shopping mall's platform When mobile phone charge, after user selects corresponding face amount and pays, user's payment result can be notified online shopping mall by payment platform Platform, online shopping mall's platform carries out subsequent replenishment movement further according to user's payment result later.And if user payment after the completion of, User's payment result is not notified online shopping mall's platform in time by payment platform, then online shopping mall's platform can actively pass through interface side Formula goes the inquiry of payment platform progress user's payment result.
Currently, online shopping mall's platform is to recycle different time sections by timed task query caching and pay nonacknowledgement information To carry out, account is counter to be looked into.But circular buffer is required when inquiring every time by this kind of method, will increase dramatically service server Expense, even if not needing the anti-order looked into current slot, timed task can also be activated scanning caching.In addition, Postpone in JVM (Java Virtual Machine, JAVA virtual machine) caching to anti-order of looking into, there are asking for data safety Topic.
Above- mentioned information are only used for reinforcing the understanding to background of the invention, therefore it disclosed in the background technology part It may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The present invention provides a kind of service request repeating method, device, equipment and readable storage medium storing program for executing based on message queue, It can be realized the repeating transmission request of different frequency, and the load of service server can be reduced and improve information security.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention Practice and acquistion.
According to an aspect of the present invention, a kind of service request repeating method based on message queue is provided, comprising: send industry The service request being engaged in message queue;And when the response message for not receiving the service request in a preset time threshold Or when detecting that the service request sends failure, according to preset configuration file chain, the service request is put into multiple First retried in message queue retries in message queue;Wherein, the multiple message queue that retries is with different message mistakes Time phase;The configuration file chain is for determining the service request in the multiple routing order retried in message queue.
According to an embodiment of the present invention, the above method further include: disappear when the service request is retried described first When message expired time in breath queue expires, the service request is put into the total message queue of redistribution;According to described The service request is routed to the service message queue by the attribute of service request from the total message queue of the redistribution In;And the service request in the repeating transmission service message queue.
According to an embodiment of the present invention, the service request retransmitted in the service message queue it Afterwards, the above method further include: when the response message for not receiving the service request in the time threshold or detect institute When stating service request and retransmitting failure, according to preset configuration file chain, the service request is put into and the multiple retries message Second in queue retries in message queue;Wherein, the described second message expired time for retrying message queue is longer than described One retries the message expired time of message queue.
According to an embodiment of the present invention, the multiple message queue that retries is dead letter queue.
According to an embodiment of the present invention, the above method further include: the service request received is put into and is connect It receives in total message queue;And the attribute according to the service request, the service request is received into total message queue from described In be routed in the service message queue.
According to another aspect of the present invention, a kind of service request retransmission arrangement based on message queue is provided, comprising: industry Business request sending module, for sending the service request in service message queue;And service request processing module, for working as The response message of the service request is not received in one preset time threshold or detects that the service request sends failure When, according to preset configuration file chain, the service request is put into multiple first retried in message queue and retries message team In column;Wherein, the multiple message queue that retries is with different message expired times;The configuration file chain is for determining institute Service request is stated in the multiple routing order retried in message queue.
According to an embodiment of the present invention, above-mentioned apparatus further include: service request redistribution module, for working as the industry When the message expired time that business request retries in message queue described first expires, the service request is put into redistribution In total message queue;Service request routing module, for the attribute according to the service request, by the service request from described It is routed in the total message queue of redistribution in the service message queue;And service request retransmits module, it is described for retransmitting The service request in service message queue.
According to an embodiment of the present invention, the service request processing module is also used to: being retransmitted in the service request Module is retransmitted after the service request in the service message queue, when not receiving the business in the time threshold The response message of request or when detecting that the service request retransmits failure, according to preset configuration file chain, by the industry Business request is put into the multiple second retried in message queue and retries in message queue;Wherein, described second message team is retried The message expired time of column is longer than the described first message expired time for retrying message queue.
According to an embodiment of the present invention, the multiple message queue that retries is dead letter queue.
According to an embodiment of the present invention, above-mentioned apparatus further include: service request receiving module, for what will be received The service request, which is put into, to be received in total message queue;Wherein, the service request routing module is also used to according to the industry The service request is routed in the service message queue by the attribute of business request from described receive in total message queue.
According to a further aspect of the invention, a kind of computer readable storage medium is provided, being stored thereon with computer can It executes instruction, such as any one of the above method is realized when the executable instruction is executed by processor.
According to a further aspect of the invention, a kind of electronic equipment is provided, comprising: processor;And memory, for depositing Store up the executable instruction of the processor;Wherein, the processor is configured to execute such as via the executable instruction is executed Any one of the above based on message queue service request repeating method the step of.
The service request repeating method based on message queue of embodiment according to the present invention has different using setting Message expired time retries message queue, it can be achieved that the repeating transmission of different frequency is requested, and service request is put into message queue In, the load of service server can be reduced and improve information security.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited Invention.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other target of the invention, feature and advantage will It becomes more fully apparent.
Fig. 1 is the application scenarios according to the method for the present invention shown in an illustrative embodiments.
Fig. 2 is a kind of stream of service request repeating method based on message queue shown according to an illustrative embodiments Cheng Tu.
Fig. 3 is the architecture diagram according to the system applied to the method for the present invention shown in an illustrative embodiments.
Fig. 4 is according to another service request repeating method based on message queue shown in an illustrative embodiments Flow chart.
Fig. 5 is the routing schematic diagram according to the service request shown in an example.
Fig. 6 is to flow to schematic diagram according to the service request shown in an example.
Fig. 7 is a kind of frame of service request retransmission arrangement based on message queue shown according to an illustrative embodiments Figure.
Fig. 8 is the structural schematic diagram according to a kind of electronic equipment shown in an illustrative embodiments.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Attached drawing is only the present invention Schematic illustrations, be not necessarily drawn to scale.Identical appended drawing reference indicates same or similar part in figure, thus Repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In mode.In the following description, many details are provided to provide and fully understand to embodiments of the present invention.So And it will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced and omit one in the specific detail Or more, or can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes Known features, method, apparatus, realization or operation are to avoid a presumptuous guest usurps the role of the host and each aspect of the present invention is made to thicken.
Message queue (Message Queue, MQ) is a kind of queue for storing message, is divided in a manner of either synchronously or asynchronously Cloth application provides loosely coupled method.Message queue is available in the application to execute multiple functions, for example requires service, exchange Information or asynchronous process etc..
Fig. 1 is the application scenarios according to the method for the present invention shown in an illustrative embodiments.As shown in Figure 1, at this Jing Zhong, comprising: an at least service request server 11, at least a Message Queuing server 12 and at least a business processing Server 13.Wherein, service request server 11 is taken by means of the message queue in Message Queuing server 12 to business processing Business device 13 sends or retransmits service request, is handled with requested service processing server 13 service request.It is anti-with account It looks into for business, service request server 11 can be for example online shopping mall's Platform Server, and Service Process Server 13 is for example It can be payment platform server.
Fig. 2 is a kind of stream of service request repeating method based on message queue shown according to an illustrative embodiments Cheng Tu.Referring to figs. 1 and 2, method 10 includes:
In step s 102, the service request in service message queue is sent.
For example, service message queue is located in the Message Queuing server 12 in Fig. 1, can be carried in service message queue The business request information of same type.When service request server 11 is needed at the service request in service message queue When reason, service request is sent to Service Process Server 13.
In step S104, when not receiving the response message of service request in a preset time threshold or detect When the service request sends failure, according to preset configuration file chain, service request is put into multiple retry in message queue First retries in message queue.
Wherein, multiple message queues that retry are respectively provided with different message expired times.
For example, after service request server 11 sends service request to Service Process Server 13, in the preset time When not receiving the response message of the return of Service Process Server 13 in threshold value, service request server is according to preset configuration file Multiple first retried in message queue that the service request is put into Message Queuing server 12 are retried message queue by chain In.In practical applications, the length of the time threshold can be set according to actual needs, and invention is not limited thereto.Furthermore In practical applications, such as monitoring to the time threshold can be realized by way of starting timer.Such as in the business of transmission After service request in message queue, start a timer, the length is the time threshold, if timer expire after still not When receiving the response message, then according to preset configuration file chain, service request is put into multiple retried in message queue One retries in message queue.
Alternatively, also the same execute is matched according to preset when detecting the transmission failure of the service request due to abnormal cause File chain is set, service request is put into multiple first retried in message queue and retries operation in message queue.
Configuration file chain is for regulation service request in multiple routing orders retried in message queue.For example, ought be for the first time After sending failure, service request is placed into first and is retried in message queue;After retransmitting failure, service request is placed into the Two retry in message queue;After retransmitting failure again, service request is placed into third, and to retry message queue medium.Configuration text The routing order for example is defined by respectively retrying the Route Distinguisher (Routing ID) of message queue in part chain.
The service request repeating method based on message queue of embodiment according to the present invention has different using setting Message expired time retries message queue, it can be achieved that the repeating transmission of different frequency is requested, and service request is put into message queue In, the load of service server can be reduced and improve information security.
It will be clearly understood that the present disclosure describe how being formed and using particular example, but the principle of the present invention is not limited to These exemplary any details.On the contrary, the introduction based on present disclosure, these principles can be applied to many other Embodiment.
Fig. 3 is the architecture diagram according to the system applied to the method for the present invention shown in an illustrative embodiments.Such as Fig. 3 institute Show, which can consist of two parts, i.e. Message Queuing Services layer and service request service layer.Wherein, disappearing as shown in figure 1 Breath queue server 12 serves Message Queuing Services layer, and service request server 11 serves service request service layer.In Fig. 3 First and third, five layer be Message Queuing Services layer, second, four, six layer be service request service layer.
Fig. 4 is according to another service request repeating method based on message queue shown in an illustrative embodiments Flow chart.In conjunction with shown in Fig. 1, Fig. 3 and Fig. 4, method 20 includes:
In step S202, the service request received is put into and is received in total message queue.
Total message queue is received to be located in Message Queuing server 12.By account is counter look into business for, for payment complete It is not received by the service request of payment success response message afterwards, after the attribute of the settable service request, by the service request It is put into and receives in total message queue.The attribute of service request for example, telephone recharge order, flow supplement order etc. with money.It should Attribute can be indicated with Route Distinguisher (Routing Key).
In step S204, according to the attribute of service request, service request is routed to accordingly from total message queue is received Service message queue in.
For example, by " MQ the monitors routing " unit in service request server 11 according to the Route Distinguisher of service request, Service request is put into corresponding message queue.For example, the service request that attribute is telephone recharge can be put into industry It is engaged in message queue one, it is medium to be that the service request supplemented with money of flow is put into service message queue two for attribute.
In step S206, the service request in service message queue is sent.
For example, multiple " MQ business processings " can be respectively set as shown in the 4th layer in Fig. 3, in service request server 11 Unit, to handle the service request in each service message queue respectively.MQ Service Processing Unit is sent out to Service Process Server 13 Give the service request in its corresponding service message queue.
In step S208, when not receiving the response message of service request in a preset time threshold or detect When the service request sends failure, judge whether can to obtain from configuration file chain it is corresponding retry queue, if it is, into Enter step S210;Otherwise, S216 is entered step.
In practical applications, the length of the time threshold can be set according to actual needs, and invention is not limited thereto. Furthermore in practical applications, such as monitoring to the time threshold can be realized by way of starting timer.Such as sending After service request in service message queue, start a timer, the length is the time thresholds, after expiring such as timer still When not receiving the response message, judges whether can to obtain from configuration file chain and corresponding retry queue.
It is also the same to execute that judge whether be with alternatively, when detecting the transmission failure of the service request due to abnormal cause The corresponding operation for retrying queue is obtained from configuration file chain.
Multiple message queues that retry are respectively provided with different message expired times, expire when the time of service request therein When, preparing re-transmission, this retries the service request in message queue.
Configuration file chain is for regulation service request in multiple routing orders retried in message queue.
In step S210, according to preset configuration file chain, service request is put into and multiple retries phase in message queue That answers retries in message queue.
To retransmit three times, and interval is retransmitted respectively for 10 seconds, 20 seconds and 30 seconds, " retry.timeout10s ", " Retry.timeout20s " and " retry.timeout30s " be respectively used to indicate message expired time be 10 seconds, 20 seconds and 30 The Route Distinguisher for retrying message queue of second, then configuration file is for example configurable to { " DEFAULT ": " retry.timeout10s"\,"retry.timeout10s":"retry.timeout20s"\,"ret ry.timeout20s":"retry.timeout30s"}。
When retransmitting first time, according to configuration file chain, service request can be put into Route Distinguisher is " The first of retry.timeout10s " retries in message queue.
When retransmitting second, according to configuration file chain, service request can be put into Route Distinguisher is " The second of retry.timeout20s " retries in message queue.
When retransmitting third time, according to configuration file chain, service request can be put into Route Distinguisher is " The third of retry.timeout30s " retries in message queue.
Dead letter queue (Dead Message) is one of message queue, is existed with the difference of common message queue In the message in dead letter queue has message expired time (Time to Live, TTL), expires when message therein reaches this When the time, message queue can handle the time overdue message.In some embodiments, the above-mentioned message queue that retries is dead letter team Column realize that service request expires the function of re-transmission using the mechanism of dead letter queue.
In step S212, when service request is retrying the message expired time in message queue and expires, business is asked It asks and is put into the total message queue of redistribution.
Such as the layer 5 in Fig. 3, Message Queuing server 12 further includes the total message queue of redistribution, is retried for being carried on The overdue service request of message expired time in message queue.
In step S214, according to the attribute of service request, by service request from the total message queue of redistribution road again By into service message queue, and it is again introduced into step S206.
For example, being asked by " the MQ business redistribution unit " in service request server 11 according to business such as layer 6 in Fig. 3 Service request is routed in service message queue by the attribute asked from the total message queue of redistribution.With step S204, such as can It is the service request that flow is supplemented with money by attribute so that attribute to be put into service message queue one as the service request of telephone recharge It is medium to be put into service message queue two.
In step S216, after print log, the service request is deleted.
Fig. 5 is the routing schematic diagram according to the service request shown in an example.Wherein, it creates Exchange and retries message Queue and the total message queue example of redistribution are as follows:
Exchange(my_exchange)
First retries message queue (my_retry_10s)
Second retries message queue (my_retry_20s)
Third retries message queue (my_retry_30s)
The total message queue of redistribution (my_handler)
Fig. 6 is to flow to schematic diagram according to the service request shown in an example.It can see from Fig. 5 and Fig. 6, service request From receiving in total message queue, it is routed in corresponding service message queue and is handled according to attribute, if processing failure, It then according to configuration file chain, is routed to and retries in message queue accordingly, if first treated fails, be put into first and retry message team In column;Failure is retried for the first time, second is put into and retries in message queue;Identification is retried for the second time, is put into third and is retried message team It arranges medium.
Thread can be used in specific implementation in service request repeating method according to the present invention based on message queue The mode of scan round, so as to the reliability of lifting system performance and the complexity of reduction code development.
It will be appreciated by those skilled in the art that realizing that all or part of the steps of above embodiment is implemented as being held by CPU Capable computer program.When the computer program is executed by CPU, execute above-mentioned defined by the above method provided by the invention Function.The program can store in a kind of computer readable storage medium, which can be read-only memory, Disk or CD etc..
Further, it should be noted that above-mentioned attached drawing is only according to the present invention included by the method for illustrative embodiments Processing schematically illustrates, rather than limits purpose.It can be readily appreciated that above-mentioned processing shown in the drawings does not indicate or limits these The time sequencing of processing.In addition, being also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules 's.
Following is apparatus of the present invention embodiment, can be used for executing embodiment of the present invention method.For apparatus of the present invention reality Undisclosed details in example is applied, embodiment of the present invention method is please referred to.
Fig. 7 is a kind of frame of service request retransmission arrangement based on message queue shown according to an illustrative embodiments Figure.As shown in fig. 7, device 30 includes: service request sending module 302 and service request processing module 304.
Wherein, service request sending module 302 is used to send the service request in service message queue.
Service request processing module 304 is used for when the response message for not receiving service request in a preset time threshold Or when detecting that the service request sends failure, according to preset configuration file chain, service request is put into multiple retry First in message queue retries in message queue.Wherein, multiple message queues that retry are with different message expired times;Institute Configuration file chain is stated for determining the service request in the multiple routing order retried in message queue.
In some embodiments, device 30 further include: service request redistribution module 306, service request routing module 308 And service request retransmits module 310.Wherein, service request redistribution module 306 is used to retry message first when service request When message expired time in queue expires, service request is put into the total message queue of redistribution.Service request routes mould Block 308 is used for the attribute according to service request, and service request is routed to service message queue from the total message queue of redistribution In.Service request retransmits the service request that module 310 is used to retransmit in service message queue.
In some embodiments, service request processing module 304, which is also used to work as, does not receive business in the time threshold The response message of request or when detecting that the service request retransmits failure, according to preset configuration file chain, business is asked It asks and is put into multiple second retried in message queue and retries in message queue.Wherein, second retry message queue message it is expired Time is longer than the first message expired time for retrying message queue.
In some embodiments, multiple message queues that retry are dead letter queue.
In some embodiments, device 30 further include: service request receiving module 312, for the business received to be asked It asks to be put into and receive in total message queue.Service request routing module 308 is also used to the attribute according to service request, and business is asked It asks and is routed in service message queue from the total message queue of reception.
The service request repeating method based on message queue of embodiment according to the present invention has different using setting Message expired time retries message queue, it can be achieved that the repeating transmission of different frequency is requested, and service request is put into message queue In, the load of service server can be reduced and improve information security.
It should be noted that above-mentioned block diagram shown in the drawings is functional entity, not necessarily must with physically or logically Independent entity is corresponding.Can realize these functional entitys using software form, or in one or more hardware modules or These functional entitys are realized in integrated circuit, or are realized in heterogeneous networks and/or processor device and/or microcontroller device These functional entitys.
Fig. 8 is the structural schematic diagram according to a kind of electronic equipment shown in an illustrative embodiments.It should be noted that Electronic equipment shown in Fig. 8 is only an example, should not function to the embodiment of the present application and use scope bring any limit System.
As shown in figure 8, electronic equipment 800 includes central processing unit (CPU) 801, it can be according to being stored in read-only deposit Program in reservoir (ROM) 802 is held from the program that storage section 808 is loaded into random access storage device (RAM) 803 The various movements appropriate of row and processing.In RAM 803, also it is stored with system 800 and operates required various programs and data. CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (I/O) interface 805 is also connected to always Line 804.
I/O interface 805 is connected to lower component: the importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.; And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon Computer program be mounted into storage section 808 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable storage Computer program on medium, the computer program include the program code for executing method shown in above-mentioned flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 809, and/or from can Medium 811 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 801, the system that executes the application The above-mentioned function of middle restriction.
It should be noted that computer readable storage medium shown in the application can be computer-readable signal media or Person's computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- But be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above group It closes.The more specific example of computer readable storage medium can include but is not limited to: have being electrically connected for one or more conducting wires Connect, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed it is read-only Memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer readable storage medium other than readable storage medium storing program for executing, which can send, propagate or Person's transmission is for by the use of instruction execution system, device or device or program in connection.It is computer-readable to deposit The program code for including on storage media can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF Etc. or above-mentioned any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include transmission unit, acquiring unit, determination unit and first processing units.Wherein, the title of these units is under certain conditions simultaneously The restriction to the unit itself is not constituted, for example, transmission unit is also described as " sending picture to the server-side connected The unit of acquisition request ".
As on the other hand, present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums Matter can be included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment. Above-mentioned computer readable storage medium carries one or more program, when said one or multiple programs by one this set When standby execution, so that the equipment includes:
Send the service request in service message queue;And
When not receiving the response message of the service request in a preset time threshold or detect the business When request sends failure, according to preset configuration file chain, the service request is put into multiple the retried in message queue One retries in message queue;
Wherein, the multiple message queue that retries is with different message expired times;The configuration file chain is for true The fixed service request is in the multiple routing order retried in message queue.
It is particularly shown and described exemplary embodiments of the present invention above.It should be appreciated that the present invention is unlimited In detailed construction described herein, set-up mode or implementation method;On the contrary, it is intended to cover included in appended claims Spirit and scope in various modifications and equivalence setting.

Claims (12)

1. a kind of service request repeating method based on message queue characterized by comprising
Send the service request in service message queue;And
When not receiving the response message of the service request in a preset time threshold or detect the service request When sending failure, according to preset configuration file chain, the service request is put into multiple the first weights retried in message queue It tries in message queue;
Wherein, the multiple message queue that retries is with different message expired times;The configuration file chain is for determining institute Service request is stated in the multiple routing order retried in message queue.
2. the method according to claim 1, wherein further include:
When the message expired time that the service request retries in message queue described first expires, by the service request It is put into the total message queue of redistribution;
According to the attribute of the service request, the service request is routed to the industry from the total message queue of the redistribution It is engaged in message queue;And
Retransmit the service request in the service message queue.
3. according to the method described in claim 2, it is characterized in that, in the industry retransmitted in the service message queue After business request, the method also includes:
When the response message for not receiving the service request in the time threshold or detect that the service request is retransmitted When failure, according to preset configuration file chain, the service request is put into the multiple the second weight retried in message queue It tries in message queue;
Wherein, the described second message expired time for retrying message queue be longer than described first retry message queue message it is expired Time.
4. method according to any one of claim 1-3, which is characterized in that the multiple message queue that retries is dead Believe queue.
5. method according to any one of claim 1-3, which is characterized in that further include:
The service request received is put into and is received in total message queue;And
According to the attribute of the service request, the service request is routed to the business from described receive in total message queue In message queue.
6. a kind of service request retransmission arrangement based on message queue characterized by comprising
Service request sending module, for sending the service request in service message queue;And
Service request processing module, for when the response message that do not receive in a preset time threshold service request or When person detects that the service request sends failure, according to preset configuration file chain, the service request is put into multiple heavy First in examination message queue retries in message queue;
Wherein, the multiple message queue that retries is with different message expired times;The configuration file chain is for determining institute Service request is stated in the multiple routing order retried in message queue.
7. device according to claim 6, which is characterized in that further include:
Service request redistribution module, when the message for retrying in message queue when the service request described first is expired Between when expiring, the service request is put into the total message queue of redistribution;
Service request routing module, it is for the attribute according to the service request, the service request is total from the redistribution It is routed in message queue in the service message queue;And
Service request retransmits module, the service request for retransmitting in the service message queue.
8. device according to claim 7, which is characterized in that the service request processing module is also used to: in the industry Business request repeat module is retransmitted after the service request in the service message queue, when not receiving in the time threshold To the response message of the service request or when detecting that the service request retransmits failure, according to preset configuration file The service request is put into the multiple second retried in message queue and retried in message queue by chain;
Wherein, the described second message expired time for retrying message queue be longer than described first retry message queue message it is expired Time.
9. device a method according to any one of claims 6-8, which is characterized in that the multiple message queue that retries is dead Believe queue.
10. device a method according to any one of claims 6-8, which is characterized in that further include: service request receiving module, It is received in total message queue for the service request received to be put into;Wherein, the service request routing module is also For the attribute according to the service request, the service request is routed to the business from described receive in total message queue In message queue.
11. a kind of computer readable storage medium, is stored thereon with computer executable instructions, which is characterized in that described to hold Row instruction realizes method according to any one of claims 1 to 5 when being executed by processor.
12. a kind of electronic equipment characterized by comprising
Processor;And memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to come described in any one of perform claim requirement 1-5 via the execution executable instruction The step of service request repeating method based on message queue.
CN201710347403.7A 2017-05-17 2017-05-17 Service request retransmission method and device based on message queue and readable storage medium Active CN108965164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710347403.7A CN108965164B (en) 2017-05-17 2017-05-17 Service request retransmission method and device based on message queue and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710347403.7A CN108965164B (en) 2017-05-17 2017-05-17 Service request retransmission method and device based on message queue and readable storage medium

Publications (2)

Publication Number Publication Date
CN108965164A true CN108965164A (en) 2018-12-07
CN108965164B CN108965164B (en) 2021-12-07

Family

ID=64461465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710347403.7A Active CN108965164B (en) 2017-05-17 2017-05-17 Service request retransmission method and device based on message queue and readable storage medium

Country Status (1)

Country Link
CN (1) CN108965164B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697113A (en) * 2018-12-29 2019-04-30 广州华多网络科技有限公司 Request method, apparatus, equipment and the readable storage medium storing program for executing retried
CN110377433A (en) * 2019-06-04 2019-10-25 威富通科技有限公司 Asynchronous notification method, device and payment gateway, the storage medium of payment result
CN110740103A (en) * 2019-09-02 2020-01-31 深圳壹账通智能科技有限公司 Service request processing method and device, computer equipment and storage medium
CN111130714A (en) * 2019-11-28 2020-05-08 网银在线(北京)科技有限公司 Data transmission method, device, electronic equipment and computer readable medium
CN111338810A (en) * 2018-12-19 2020-06-26 北京京东尚科信息技术有限公司 Method and apparatus for storing information
CN112015565A (en) * 2019-05-29 2020-12-01 北京京东尚科信息技术有限公司 Method and device for determining task downloading queue
CN112583742A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Message processing method and device
CN112631808A (en) * 2020-12-29 2021-04-09 上海众源网络有限公司 Data synchronization method and device, electronic equipment and storage medium
CN112667439A (en) * 2020-12-26 2021-04-16 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN112953769A (en) * 2021-02-10 2021-06-11 中国工商银行股份有限公司 Data transmission method, device, computer system and readable storage medium
CN112948174A (en) * 2021-02-03 2021-06-11 江苏苏宁物流有限公司 Message processing method and device, computer equipment and storage medium
CN113783666A (en) * 2020-11-27 2021-12-10 北京京东振世信息技术有限公司 Method and device for processing service
CN113794744A (en) * 2021-01-29 2021-12-14 北京京东拓先科技有限公司 Message processing method and related equipment
WO2022033586A1 (en) * 2020-08-14 2022-02-17 网联清算有限公司 Message sending method and device
CN114187999A (en) * 2022-02-17 2022-03-15 四川赛尔斯科技有限公司 Hospital unified payment management platform and control method
CN115086414A (en) * 2022-05-10 2022-09-20 北京明略昭辉科技有限公司 Message processing method and device, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277175A (en) * 2007-03-30 2008-10-01 国际商业机器公司 Method and device for improving conversation starting protocol server performance
US20090271789A1 (en) * 2008-04-28 2009-10-29 Babich Alan F Method, apparatus and article of manufacture for timeout waits on locks
US20100180045A1 (en) * 2009-01-15 2010-07-15 Jonathan Weinstock Managing multi-step retry reinitialization protocol flows
CN103019866A (en) * 2012-10-24 2013-04-03 北京京东世纪贸易有限公司 Distributed method and system based on message queue
CN103559204A (en) * 2013-10-08 2014-02-05 北京奇虎科技有限公司 Database operation request processing method, unit and system
CN104731912A (en) * 2015-03-24 2015-06-24 浪潮集团有限公司 Message transmission method and device for message middleware MQ
CN105591877A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method, device and system for service message transmission
CN105897549A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Message sending and receiving methods and message sending and receiving devices
CN106302647A (en) * 2016-07-29 2017-01-04 深圳前海微众银行股份有限公司 message distributing method and server
US9590885B1 (en) * 2013-03-13 2017-03-07 Sprint Communications Company L.P. System and method of calculating and reporting of messages expiring from a queue

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277175A (en) * 2007-03-30 2008-10-01 国际商业机器公司 Method and device for improving conversation starting protocol server performance
US20090271789A1 (en) * 2008-04-28 2009-10-29 Babich Alan F Method, apparatus and article of manufacture for timeout waits on locks
US20100180045A1 (en) * 2009-01-15 2010-07-15 Jonathan Weinstock Managing multi-step retry reinitialization protocol flows
CN103019866A (en) * 2012-10-24 2013-04-03 北京京东世纪贸易有限公司 Distributed method and system based on message queue
US9590885B1 (en) * 2013-03-13 2017-03-07 Sprint Communications Company L.P. System and method of calculating and reporting of messages expiring from a queue
CN103559204A (en) * 2013-10-08 2014-02-05 北京奇虎科技有限公司 Database operation request processing method, unit and system
CN105591877A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method, device and system for service message transmission
CN104731912A (en) * 2015-03-24 2015-06-24 浪潮集团有限公司 Message transmission method and device for message middleware MQ
CN105897549A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Message sending and receiving methods and message sending and receiving devices
CN106302647A (en) * 2016-07-29 2017-01-04 深圳前海微众银行股份有限公司 message distributing method and server

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338810A (en) * 2018-12-19 2020-06-26 北京京东尚科信息技术有限公司 Method and apparatus for storing information
CN109697113A (en) * 2018-12-29 2019-04-30 广州华多网络科技有限公司 Request method, apparatus, equipment and the readable storage medium storing program for executing retried
CN112015565A (en) * 2019-05-29 2020-12-01 北京京东尚科信息技术有限公司 Method and device for determining task downloading queue
CN112015565B (en) * 2019-05-29 2023-09-05 北京京东振世信息技术有限公司 Method and device for determining task downloading queue
CN110377433A (en) * 2019-06-04 2019-10-25 威富通科技有限公司 Asynchronous notification method, device and payment gateway, the storage medium of payment result
CN110740103A (en) * 2019-09-02 2020-01-31 深圳壹账通智能科技有限公司 Service request processing method and device, computer equipment and storage medium
CN112583742A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Message processing method and device
CN111130714A (en) * 2019-11-28 2020-05-08 网银在线(北京)科技有限公司 Data transmission method, device, electronic equipment and computer readable medium
CN111130714B (en) * 2019-11-28 2023-04-07 网银在线(北京)科技有限公司 Data transmission method, device, electronic equipment and computer readable medium
WO2022033586A1 (en) * 2020-08-14 2022-02-17 网联清算有限公司 Message sending method and device
CN113783666A (en) * 2020-11-27 2021-12-10 北京京东振世信息技术有限公司 Method and device for processing service
CN112667439A (en) * 2020-12-26 2021-04-16 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN112631808A (en) * 2020-12-29 2021-04-09 上海众源网络有限公司 Data synchronization method and device, electronic equipment and storage medium
CN113794744A (en) * 2021-01-29 2021-12-14 北京京东拓先科技有限公司 Message processing method and related equipment
CN112948174A (en) * 2021-02-03 2021-06-11 江苏苏宁物流有限公司 Message processing method and device, computer equipment and storage medium
CN112953769A (en) * 2021-02-10 2021-06-11 中国工商银行股份有限公司 Data transmission method, device, computer system and readable storage medium
CN114187999A (en) * 2022-02-17 2022-03-15 四川赛尔斯科技有限公司 Hospital unified payment management platform and control method
CN114187999B (en) * 2022-02-17 2022-04-19 四川赛尔斯科技有限公司 Hospital unified payment management platform and control method
CN115086414A (en) * 2022-05-10 2022-09-20 北京明略昭辉科技有限公司 Message processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN108965164B (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN108965164A (en) Service request repeating method, device and readable storage medium storing program for executing based on message queue
CN107623690A (en) Login method, equipment and storage medium
CN110262807A (en) Cluster creates Progress Log acquisition system, method and apparatus
CN107066609A (en) Image display method and device
US8843940B2 (en) Centralized audit and error handling
CN109257320A (en) Message storage method and device
CN110430257A (en) Information processing method, device, system and readable storage medium storing program for executing
CN107862044A (en) The method and apparatus of displayed page
CN109614245A (en) Message delivery method, device, electronic equipment and the storage medium of message-oriented middleware
CN109218041A (en) Request processing method and device for server system
CN107403112A (en) Data verification method and its equipment
CN110399253A (en) Delay machine treating method and apparatus
CN109583873A (en) Transaction communications method, server, POS machine and electronic equipment
CN105578431A (en) Reminding message sending device and method
CN102457824B (en) Event processing method and device
CN110223051A (en) Method of payment, device, equipment, system and storage medium
CN115665274A (en) Data transmission method and system of heterogeneous protocol, electronic device and storage medium
CN108733560A (en) A kind of test method and device
CN108833517A (en) Data processing system, method, electronic equipment and storage medium
US11620586B2 (en) Offline authorization of airline ticketing requests
CN111341039B (en) Card-retaining processing method and system, client and server
CN114897573A (en) Commodity information processing method and device, readable medium and electronic equipment
CN113778631A (en) Distributed transaction compensation method and device, electronic equipment and readable storage medium
CN107679843A (en) A kind of method, apparatus, server and storage medium for lifting rate of drawing a bill
CN109741069A (en) Processing method, device, electronic equipment and the readable storage medium storing program for executing of transaction data

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