CN107896172A - Monitor fault handling method and device, storage medium and electronic equipment - Google Patents
Monitor fault handling method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN107896172A CN107896172A CN201711193568.XA CN201711193568A CN107896172A CN 107896172 A CN107896172 A CN 107896172A CN 201711193568 A CN201711193568 A CN 201711193568A CN 107896172 A CN107896172 A CN 107896172A
- Authority
- CN
- China
- Prior art keywords
- message
- queue
- monitor
- message queue
- listener
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0659—Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
- H04L41/0661—Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses one kind to monitor fault handling method and device, storage medium and electronic equipment, is related to data communication technology field.The monitoring fault handling method is applied to the system for including message queue and information consumption end, and the monitoring fault handling method includes:Message listener and Message Processing application are decoupled at information consumption end;Message queue is monitored, unexpected message queue be present if detected in message queue, by pre- routing by management of monitor device of the unexpected message queue notification to information consumption end;Management of monitor device determines message listener corresponding with unexpected message queue as target monitor;Target monitor is detected to restart target monitor in the case where detecting target monitor failure.The present invention can solve the problems, such as to cause message queue exception due to monitor failure, and be decoupled by the way that monitor and Message Processing are applied, it is possible to achieve the design requirement of high cohesion lower coupling.
Description
Technical field
The present invention relates to data communication technology field, monitors fault handling method in particular to one kind, monitors failure
Processing unit, storage medium and electronic equipment.
Background technology
With the development of social informatization, the data interaction between each operation system is more and more frequent.At present, in each business
Data interaction is often realized using RabbitMQ (a kind of data communications method) between system.Specifically, first, message production
End (Producer) can send a message to message switching unit (Exchange);Then, message switching unit can be by message point
Issue each queue (Queue) with message switching unit binding;In addition, information consumption end (Consumer) can pass through monitor
(Monitor) queue is monitored, and after the message in queue is listened to and handled by information consumption end, message
Consumption terminal, which can be fed back to, is (Callback) to queue;Next, queue can remove current message.Thus, current number
Terminate according to interaction process.
But, on the one hand, it presently, there are because monitor reasons such as machine of delaying cause in queue message-length accumulation too high
Problem;On the other hand, for information consumption end, the degree of coupling of monitor and the Message Processing application of specific processing message compared with
Height, code maintenance is being carried out or in project iteration to monitor or Message Processing application, developer changes certain code
The mistake of whole system may be caused, this is unsatisfactory for the design requirement of high cohesion lower coupling.
In consideration of it, need a kind of monitoring fault handling method, monitor fault treating apparatus, storage medium and electronic equipment.
It should be noted that information is only used for strengthening the reason of the background to the present invention disclosed in above-mentioned background section
Solution, therefore can include not forming the information to prior art known to persons of ordinary skill in the art.
The content of the invention
It is an object of the invention to provide one kind monitor fault handling method, monitor fault treating apparatus, storage medium and
Electronic equipment, and then one or more is at least overcome caused by the limitation of correlation technique and defect to a certain extent
Problem.
According to an aspect of the present invention, there is provided one kind monitors fault handling method, applied to including message queue and disappearing
The system of consumption terminal is ceased, monitoring fault handling method includes:
Message listener and Message Processing application are decoupled at information consumption end;
Message queue is monitored, unexpected message queue be present if detected in message queue, by predetermined logical
Road is by management of monitor device of the unexpected message queue notification to information consumption end;
Management of monitor device determines message listener corresponding with unexpected message queue as target monitor;
Target monitor is detected to restart target monitor in the case where detecting target monitor failure.
Alternatively, message listener and Message Processing application decoupling are included:
Message Processing application is registered;
Obtain the message transmission conditions from Message Processing application;
Message is sent to corresponding Message Processing application via message listener according to message transmission conditions.
Alternatively, monitoring fault handling method also includes:
Data transfer between message listener and Message Processing application is realized using RESTful frameworks.
Alternatively, management of monitor device of the unexpected message queue notification to information consumption end is included by pre- routing:
By http protocol or RESTful interfaces by management of monitor device of the unexpected message queue notification to information consumption end.
Alternatively, unexpected message queue is the abnormal message queue of queue length;
Wherein, message queue is monitored including:
Judge whether the length of message queue is abnormal.
Alternatively, management of monitor device determines message listener corresponding with unexpected message queue as target monitor bag
Include:
Management of monitor device determines and unexpected message queue according to the mapping table between message listener and message queue
Corresponding message listener is as target monitor.
Alternatively, monitoring fault handling method also includes:
In the case where detecting target monitor failure, alarm signal is sent.
According to an aspect of the present invention, there is provided one kind monitors fault processing system, including message queue and information consumption
End, monitoring fault processing system also includes:
Decoupling module, for decoupling message listener and Message Processing application at information consumption end;
Queue monitoring module, for being monitored to message queue, and unexpected message in message queue is detected be present
During queue, by pre- routing by management of monitor device of the unexpected message queue notification to information consumption end;
Management of monitor device, for determining message listener corresponding with unexpected message queue as target monitor, to mesh
Mark monitor is detected to restart target monitor in the case where detecting target monitor failure.
Alternatively, decoupling module includes:
Registering unit is applied in processing, for being registered to Message Processing application;
Transmission conditions acquiring unit, for obtaining the message transmission conditions from Message Processing application;
Message sending unit, for being sent message to corresponding message via message listener according to message transmission conditions
Processing application.
Alternatively, monitoring fault treating apparatus also includes:
Data transmission module, for realizing the number between message listener and Message Processing application using RESTful frameworks
According to transmission.
Alternatively, queue monitoring module includes:
Exception queue notification unit, for when unexpected message queue in detecting message queue be present, being assisted by HTTP
View or RESTful interfaces are by management of monitor device of the unexpected message queue notification to information consumption end.
Alternatively, unexpected message queue is the abnormal message queue of queue length;
Wherein, queue monitoring module also includes:
Length abnormal deciding means, for judging whether the length of message queue is abnormal.
Alternatively, management of monitor device includes:
Monitoring unit, for management of monitor device according between message listener and message queue mapping table determine with
Message listener is as target monitor corresponding to unexpected message queue.
Alternatively, management of monitor device also includes:
Alarm signal transmitting element, in the case where detecting target monitor failure, sending alarm signal.
According to an aspect of the present invention, there is provided a kind of storage medium, be stored thereon with computer program, computer program
The monitoring fault handling method of above-mentioned any one is realized when being executed by processor.
According to an aspect of the present invention, there is provided a kind of electronic equipment, including:
Processor;And
Memory, for storing the executable instruction of processor;
Wherein, processor is configured to perform the monitoring troubleshooting side of above-mentioned any one via executable instruction is performed
Method.
In the technical scheme that some embodiments of the present invention are provided, by by message listener and Message Processing application
Decoupling, unexpected message queue is monitored, and determine monitor corresponding to unexpected message queue as target monitor, detection target prison
Listen device and restart target monitor in target monitor failure, on the one hand, by restarting monitor automatically, can solve to monitor
Device failure causes the problem of message queue exception to be participated in without artificial;On the other hand, should by message listener and Message Processing
With decoupling, it can avoid when carrying out code maintenance or project iteration, because modification certain code causes whole system mistake
The problem of, realize the design requirement of high cohesion lower coupling.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not
The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the present invention
Example, and for explaining principle of the invention together with specification.It should be evident that drawings in the following description are only the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
These accompanying drawings obtain other accompanying drawings.In the accompanying drawings:
Fig. 1 diagrammatically illustrates the square frame of the communication of the data based on RabbitMQ patterns of some schemes in the prior art
Figure;
Fig. 2 diagrammatically illustrates the flow chart of monitoring fault handling method according to an illustrative embodiment of the invention;
Fig. 3 diagrammatically illustrate according to an illustrative embodiment of the invention by message listener and Message Processing application
The block diagram of data communication after decoupling;
Fig. 4 diagrammatically illustrates the data communication of the monitoring fault handling method using the illustrative embodiments of the present invention
Block diagram;
Fig. 5 diagrammatically illustrates the block diagram of monitoring fault processing system according to an illustrative embodiment of the invention;
Fig. 6 diagrammatically illustrates the block diagram of decoupling module according to an illustrative embodiment of the invention;
Fig. 7 diagrammatically illustrates another square frame of monitoring fault processing system according to an illustrative embodiment of the invention
Figure;
Fig. 8 diagrammatically illustrates the block diagram of queue monitoring module according to an illustrative embodiment of the invention;
Fig. 9 diagrammatically illustrates another block diagram of queue monitoring module according to an illustrative embodiment of the invention;
Figure 10 diagrammatically illustrates the block diagram of management of monitor device according to an illustrative embodiment of the invention;
Figure 11 diagrammatically illustrates another block diagram of management of monitor device according to an illustrative embodiment of the invention;
Figure 12 shows the schematic diagram of storage medium according to an illustrative embodiment of the invention;And
Figure 13 diagrammatically illustrates the block diagram of electronic equipment according to an illustrative embodiment of the invention.
Embodiment
Example embodiment is described more fully with referring now to accompanying drawing.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, these embodiments are provided so that the disclosure will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot
Structure or characteristic can be incorporated in one or more embodiments in any suitable manner.In the following description, there is provided permitted
More details fully understand so as to provide to embodiments of the present invention.It will be appreciated, however, by one skilled in the art that can
Omitted with putting into practice technical scheme one or more in the specific detail, or others side can be used
Method, constituent element, device, step etc..In other cases, be not shown in detail or describe known solution a presumptuous guest usurps the role of the host to avoid and
So that each side of the disclosure thickens.
In addition, accompanying drawing is only the schematic illustrations of the present invention, it is not necessarily drawn to scale.Identical accompanying drawing mark in figure
Note represents same or similar part, thus will omit repetition thereof.Some block diagrams shown in accompanying drawing are work(
Can entity, not necessarily must be corresponding with physically or logically independent entity.These work(can be realized using software form
Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place
These functional entitys are realized in reason device device and/or microcontroller device.
Flow chart shown in accompanying drawing is merely illustrative, it is not necessary to including all steps.For example, the step of having
The step of can also decomposing, and having, can merge or part merges, therefore the order actually performed is possible to according to actual conditions
Change.
Fig. 1 diagrammatically illustrates the square frame of the communication of the data based on RabbitMQ patterns of some schemes in the prior art
Figure.Data communication process can be:First, the message manufacturing side 11 can send the message data produced to message queue
Message switching unit 121 in server 12;Bound next, message switching unit 121 can send message data to it
Message queue 122, message queue 123, message queue 124 or message queue 125;Sent with message data to message queue 122
Exemplified by, information consumption end 13 corresponding with message queue 122 can by its monitoring information queue 122 of message listener 131, when
When message data is sent to message queue 122, message listener 131 can be listened to and obtain the message data, and this is disappeared
Breath data send to the Message Processing application (not shown) in information consumption end 13 to apply so as to Message Processing to be carried out to the data
Processing.Thus, the data communication process based on RabbitMQ patterns is completed.In addition, include the message of message listener 141
Consumption terminal 14 can be corresponding with message queue 123, and the information consumption end 15 for including message listener 151 can be with message queue
124 correspondences, and the information consumption end 16 comprising message listener 161 can be corresponding with message queue 125, their specific numbers
Can be identical with communication mode corresponding to message queue 122 according to communication mode, it will not be repeated here.
However, the shortcomings that such data communication mode, may include:On the one hand, the machine if a message listener is delayed,
Corresponding to being likely to occur the problem of message queue data stacking, and developer or operation maintenance personnel can not be found in time;The opposing party
Face, for information consumption end, monitor and the degree of coupling that Message Processing is applied are higher, enter to monitor or Message Processing application
Line code safeguards or in project iteration, and developer, which changes certain code, may cause the mistake of whole system, and this is discontented
The design requirement of sufficient high cohesion lower coupling.
In consideration of it, the invention provides one kind to monitor fault handling method.
Fig. 2 diagrammatically illustrates the flow chart of the monitoring fault handling method of the illustrative embodiments of the present invention.The prison
Fault handling method is listened to can apply to the system for including message queue and information consumption end, with reference to figure 2, monitoring of the invention event
Barrier processing method may comprise steps of:
S20. message listener and Message Processing application are decoupled at the information consumption end.
In an exemplary embodiment of the present invention embodiment, information consumption end can include message listener and Message Processing should
With.Wherein, message listener can be used for monitoring corresponding with information consumption end message queue, and Message Processing application can be with
It is the application of specific processing message data, can be used for being processed data, integrate, show, the present invention is to Message Processing
The concrete function of application does not do particular determination.
According to some embodiments of the present invention, the method specifically decoupled can for example including:It is possible, firstly, to Message Processing
Using being registered;Next, user can configure message transmission conditions in its client, specifically, user can be by disappearing
User interface configuration message transmission conditions corresponding to breath processing application;Then, server can be according to message transmission conditions
Message is sent to corresponding Message Processing application via message listener.In above-mentioned message transmitting procedure, it can use
RESTful frameworks realize the data transfer between message listener and Message Processing application, specifically, message transmission conditions can be with
The RESTful data compatible with each module are converted into, and RESTful service interfaces can be provided and carry out corresponding transmission clothes
Business.Furthermore it is possible to all kinds of markup languages (for example, URI) based on RESTful carry out deblocking arrangement, according to historical record
Data are classified, thus, can not only obtain maximized data storage, are also more accurately oriented to be provided during screening.
Based on RESTful frameworks, it is possible to achieve the Loosely Coupled Architecture of stateless resourceoriented, without considering current message
The state of transmission, meet message listener and the design object of the high cohesion lower coupling of Message Processing application.
Fig. 3 diagrammatically illustrate according to an illustrative embodiment of the invention by message listener and Message Processing application
The block diagram of data communication after decoupling.First, the message that the message manufacturing side 31 can be produced sends to message queue and taken
The message switching unit 321 being engaged in device 32, in addition, though not shown in figure, it should be understood that, Message Queuing server 32
Other message switching units can also be included, and the present invention does not do particular determination to the quantity of message switching unit;Then, message is handed over
Changing planes 321 can send a message to message queue 322, message queue 323, message queue 324 or message queue 325, in addition,
Similarly, in Message Queuing server 32 can also include other message queues and/or it is corresponding with message switching unit 321 other
Message queue;Next, being sent by message to message queue 322, the message listener 331 in information consumption end 33 monitors
Received to message queue 322 after having message, the message can be obtained.In addition, on the one hand, the message in information consumption end 33 is monitored
Device 331 can send a message to the Message Processing decoupled with it and apply 332, so that Message Processing is entered using 332 pairs of message
Row processing, the advantage decoupled herein are, if the code of modification message listener 331, will not directly influence Message Processing
Using 332;On the other hand, although it is not shown in the diagrams, can also be right with message listener 331 comprising other in information consumption end 33
The Message Processing application answered.Similarly, include message listener 341 and the Message Processing that decouples with it apply 342 message
Consumption terminal 34 can be corresponding with message queue 323, and the Message Processing for including message listener 351 and being decoupled with it applies 352
Information consumption end 35 can be corresponding with message queue 324, and include message listener 361 and the Message Processing decoupled with it
Can be corresponding with message queue 325 using 362 information consumption end 36, their specific data communication modes and message queue
Communication mode is identical corresponding to 322, will not be repeated here.
In addition, the present invention can use other frameworks realize the decoupling of message listener and information consumption end, for example, can be with
Decoupling etc. is realized using lightweight open source framework Spring.It should be appreciated that to message listener in message consumption terminal with
The scheme that Message Processing application is decoupled belongs to the design of the present invention.
By the way that message listener and Message Processing application are decoupled, can avoid carrying out code maintenance or project iteration
When, due to changing the problem of certain code causes whole system mistake, realize the design requirement of high cohesion lower coupling.
S22. message queue is monitored, unexpected message queue is present if detected in message queue, by pre-
Routing is by management of monitor device of the unexpected message queue notification to information consumption end.
In an exemplary embodiment of the present invention embodiment, queue monitoring module can be configured in Message Queuing server.It is first
First, queue monitoring module can be monitored to each message queue, specifically, the object of queue monitoring module monitors can include
But the length of message queue is not limited to, in this case, message queue, which is monitored, can include judging message queue
Whether length is abnormal;Next, it can be configured to detect the management of monitor device of message listener at information consumption end.Work as queue
, can be by the unexpected message queue notification to information consumption when unexpected message queue be present in monitoring module monitors outbound message queue
The management of monitor device at end.
For example, the length of pre-defined message queue is 1M, when queue monitoring module monitors outbound message queue A length
During more than 1M, message queue A can be defined as to unexpected message queue and notify message queue A to give management of monitor device.
According to some embodiments of the present invention, queue monitoring module can be by pre- routing by unexpected message queue notification
Give management of monitor device.Specifically, pre- routing can be the transmission channel built by http protocol, however, pre- routing may be used also
To be the transmission channel to be communicated using RESTful interfaces, however, not limited to this, the present invention can also use other communications
Mode realizes the information transfer between queue monitoring module and management of monitor device, and it is special that this is not done in this illustrative embodiments
Limit.
S24. management of monitor device determines message listener corresponding with unexpected message queue as target monitor.
In an exemplary embodiment of the present invention embodiment, queue monitoring module gives unexpected message queue notification to management of monitor device
Afterwards, management of monitor device can determine message listener corresponding with the unexpected message queue, and can make the message listener
For target monitor.
According to some embodiments of the present invention, message listener can correspond to one or more message queues.Management of monitor
Device can be based on configuration message listener and the corresponding relation of message queue determine that the corresponding message of unexpected message queue is supervised
Listen device., can be by tabling look-up for example, server can be stored with the mapping table between message listener and message queue
Mode determines message listener corresponding to unexpected message queue.
S26. target monitor is detected to restart the mesh in the case where detecting target monitor failure
Mark monitor.
After target monitor is determined, the working condition of target monitor can be detected.If specifically, inspection
Target monitor failure is measured, then restarts target monitor.Wherein, the reason for causing target monitor failure may include multi-party
Face, for example, software fault, corrupted data, security breaches etc..And these failures may result in target monitor and delay machine, and then
Cause message queue length abnormal.That is, target monitor failure, which is probably message queue, there is the reason for abnormal.
In addition, when management of monitor device is detecting target monitor, that is to say, that management of monitor device determine with it is different
Corresponding to normal message queue during message listener, alarm signal can be sent.For example, can be in the form of short message or mail to opening
Hair personnel or operation maintenance personnel send warning message so that developer or operation maintenance personnel know the situation of unexpected message queue.
The monitoring fault handling method of the present invention will be illustrated by taking the communication of data shown in Fig. 4 as an example below.
On the one hand, the message that the message that the message manufacturing side 41 can be produced is sent in Message Queuing server 42 is handed over
Change planes 421, message switching unit 421 can send the message data received to message queue 422, message queue 423, message
Queue 424, message queue 425, message queue 426 or message queue 427.In addition, queue detection module 4800 can supervise in real time
Survey in message queue 422 to 427 with the presence or absence of the message queue that length is abnormal;On the other hand, can be by information consumption end 43
Message listener 431 and Message Processing using 432 and Message Processing using 433 decouplings, furthermore it is possible to by information consumption end 44
In message listener 441 and Message Processing using 442 and Message Processing using 443 decouplings, can be by information consumption end 45
Message listener 451 and Message Processing using 452 and Message Processing using 453 decouplings.
First, by taking the length exception of message queue 422 as an example, when queue monitoring module 4800, to detect message queue 422 different
Chang Shi, message queue 422 can be notified to management of monitor device 4900 by RESTful interfaces 4700;Next, management of monitor
Device 4900 can determine that with 422 corresponding message listener of message queue be message listener 431, and to message listener
431 whether failure is detected.If detecting the failure of message listener 431, message listener 431 is restarted.
The monitoring fault handling method with the present invention is can be seen that from this process, whole process is without manually participating in, only
Warning message can be sent to developer or operation maintenance personnel when finding message listener failure, and send warning message and be only
System problem is informed, and non-required manually failure is repaired.The present invention can realize the abnormal automatic reparation of message queue
Process, thus, the time for shortening artificial participate in and delaying.
In the monitoring fault handling method of the illustrative embodiments of the present invention, by by message listener and message
Decoupling ought to be used, monitors unexpected message queue, and determines monitor corresponding to unexpected message queue as target monitor, detection
Target monitor simultaneously restarts target monitor in target monitor failure, on the one hand, by restarting monitor automatically, can solve
Certainly monitor failure causes the problem of message queue exception to be participated in without artificial;On the other hand, by message listener and message
Processing application decoupling, can avoid carrying out code maintenance or during project iteration, due to modification certain code cause be entirely
Unite the problem of wrong, realize the design requirement of high cohesion lower coupling.
It should be noted that although describing each step of method in the present invention with particular order in the accompanying drawings, still, this is simultaneously
Undesired or hint must perform these steps according to the particular order, or have to carry out the step ability shown in whole
Realize desired result.It is additional or alternative, it is convenient to omit some steps, multiple steps are merged into a step and performed,
And/or a step is decomposed into execution of multiple steps etc..
Further, a kind of monitoring fault processing system is additionally provided in this example embodiment.
Fig. 5 diagrammatically illustrates the block diagram of the monitoring fault processing system of the illustrative embodiments of the present invention.Monitor
Fault processing system can include message queue and information consumption end.With reference to figure 5, according to an illustrative embodiment of the invention
Decoupling module 51, queue monitoring module 53 and management of monitor device 55 can be included by monitoring fault processing system 5, wherein:
Decoupling module 51, it can be used for decoupling message listener and Message Processing application at the information consumption end;
It queue monitoring module 53, can be used for being monitored the message queue, and detecting the message queue
In when unexpected message queue be present, the unexpected message queue notification is given to the monitoring at the information consumption end by pre- routing
Manager;
Management of monitor device 55, it is determined for message listener corresponding with the unexpected message queue and is supervised as target
Device is listened, the target monitor is detected to restart the mesh in the case where detecting the target monitor failure
Mark monitor.
In the monitoring fault processing system of the illustrative embodiments of the present invention, on the one hand, by restarting monitoring automatically
Device, can solve the problems, such as that monitor failure causes message queue exception to be participated in without artificial;On the other hand, message is monitored
Device decouples with Message Processing application, can avoid when carrying out code maintenance or project iteration, because modification certain code is led
The problem of causing whole system mistake, realize the design requirement of high cohesion lower coupling.
According to the exemplary embodiment of the present invention, with reference to figure 6, decoupling module 51 can include processing and apply registering unit
601st, transmission conditions acquiring unit 603 and message sending unit 605, wherein:
Registering unit 601 is applied in processing, can be used for registering Message Processing application;
Transmission conditions acquiring unit 603, it can be used for obtaining the message transmission conditions from Message Processing application;
Message sending unit 605, it can be used for being sent message to right via message listener according to message transmission conditions
The Message Processing application answered.
The present exemplary embodiment provides a kind of scheme realized message listener and decoupled with Message Processing application.
According to the exemplary embodiment of the present invention, with reference to figure 7, fault processing system 7 is monitored relative to monitoring troubleshooting
System 5, in addition to including decoupling module 51, queue monitoring module 53 and management of monitor device 55, data transmission module can also be included
71, wherein:
Data transmission module 71, it can be used for realizing that message listener applies it with Message Processing using RESTful frameworks
Between data transfer.
Pass through RESTful frameworks, it is possible to achieve stateless resource loose coupling, meet message listener and Message Processing
The design object of the high cohesion lower coupling of application.
According to the exemplary embodiment of the present invention, with reference to figure 8, queue monitoring module 53 can include exception queue advice note
Member 801, wherein:
Exception queue notification unit 801, it can be used for, when unexpected message queue in detecting message queue be present, passing through
Http protocol or RESTful interfaces are by management of monitor device of the unexpected message queue notification to information consumption end.
Information channel between queue monitoring module and management of monitor device is configured by http protocol or RESTful interfaces,
Realize the process that the monitoring result based on queue monitoring module determines message listener failure.
According to the exemplary embodiment of the present invention, unexpected message queue is the abnormal message queue of queue length.Reference chart
9, queue monitoring module 91 in addition to including exception queue notification unit 801, can also include length relative to queue monitoring module 53
Abnormal deciding means 901 is spent, wherein:
Length abnormal deciding means 901, it can be used for judging whether the length of message queue is abnormal.
According to the exemplary embodiment of the present invention, with reference to figure 10, management of monitor device 55 can include monitoring unit 1001, its
In:
Monitoring unit 1001, it can be used for management of monitor device according to the corresponding relation between message listener and message queue
Table determines message listener corresponding with unexpected message queue as target monitor.
Target monitor is determined by way of tabling look-up, process is easy, and efficiency is higher.
According to the exemplary embodiment of the present invention, with reference to figure 11, management of monitor device 111 can include alarm signal and send list
Member 1101, wherein:
It alarm signal transmitting element 1101, can be used in the case where detecting the target monitor failure, send
Alarm signal.
By sending warning message so that developer or operation maintenance personnel can know the situation of target monitor failure.
Because each functional module of the program analysis of running performance device of embodiment of the present invention is invented with the above method
It is identical in embodiment, therefore will not be repeated here.
In an exemplary embodiment of the present invention, a kind of computer-readable recording medium is additionally provided, is stored thereon with energy
Enough realize the program product of this specification above method.In some possible embodiments, various aspects of the invention may be used also
In the form of being embodied as a kind of program product, it includes program code, when described program product is run on the terminal device, institute
State program code be used for make the terminal device perform described in above-mentioned " illustrative methods " part of this specification according to this hair
The step of bright various illustrative embodiments.
With reference to shown in figure 12, the program product for being used to realize the above method according to the embodiment of the present invention is described
1200, it can use portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device,
Such as run on PC.However, the program product not limited to this of the present invention, in this document, readable storage medium storing program for executing can be with
Be it is any include or the tangible medium of storage program, the program can be commanded execution system, device either device use or
It is in connection.
Described program product can use any combination of one or more computer-readable recording mediums.Computer-readable recording medium can be readable letter
Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or
System, device or the device of semiconductor, or any combination above.The more specifically example of readable storage medium storing program for executing is (non exhaustive
List) include:It is electrical connection, portable disc, hard disk, random access memory (RAM) with one or more wires, read-only
Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory
(CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media can be including the data-signal in a base band or as carrier wave part propagation, its
In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal,
Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie beyond readable storage medium storing program for executing
Matter, the computer-readable recording medium can send, propagate either transmit for used by instruction execution system, device or device or and its
The program of combined use.
The program code included on computer-readable recording medium can be transmitted with any appropriate medium, including but not limited to wirelessly, be had
Line, optical cable, RF etc., or above-mentioned any appropriate combination.
Can being combined to write the program operated for performing the present invention with one or more programming languages
Code, described program design language include object oriented program language-Java, C++ etc., include routine
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user
Perform on computing device, partly perform on a user device, the software kit independent as one performs, is partly calculated in user
Its upper side point is performed or performed completely in remote computing device or server on a remote computing.It is remote being related to
In the situation of journey computing device, remote computing device can pass through the network of any kind, including LAN (LAN) or wide area network
(WAN) user calculating equipment, is connected to, or, it may be connected to external computing device (such as utilize ISP
To pass through Internet connection).
In an exemplary embodiment of the present invention, a kind of electronic equipment that can realize the above method is additionally provided.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or
Program product.Therefore, various aspects of the invention can be implemented as following form, i.e.,:It is complete hardware embodiment, complete
The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.), or hardware and software, can unite here
Referred to as " circuit ", " module " or " system ".
The electronic equipment 1300 according to the embodiment of the invention is described referring to Figure 13.The electricity that Figure 13 is shown
Sub- equipment 1300 is only an example, should not bring any restrictions to the function and use range of the embodiment of the present invention.
As shown in figure 13, electronic equipment 1300 is showed in the form of universal computing device.The component of electronic equipment 1300 can
To include but is not limited to:Above-mentioned at least one processing unit 1310, above-mentioned at least one memory cell 1320, connection different system
The bus 1330 of component (including memory cell 1320 and processing unit 1310), display unit 1340.
Wherein, the memory cell is had program stored therein code, and described program code can be held by the processing unit 1310
OK so that the processing unit 1310 performs various according to the present invention described in above-mentioned " illustrative methods " part of this specification
The step of illustrative embodiments.For example, the processing unit 1310 can perform step S20 as shown in Figure 2:In message
Consumption terminal decouples message listener and Message Processing application;Step S22:Message queue is monitored, disappeared if detected
Unexpected message queue be present in breath queue, then by pre- routing by monitoring pipe of the unexpected message queue notification to information consumption end
Manage device;Step S24:Management of monitor device determines message listener corresponding with unexpected message queue as target monitor;Step
S26:Target monitor is detected to restart target monitor in the case where detecting target monitor failure.
Memory cell 1320 can include the computer-readable recording medium of volatile memory cell form, such as Random Access Storage Unit
(RAM) 13201 and/or cache memory unit 13202, it can further include read-only memory unit (ROM) 13203.
Memory cell 1320 can also include program/utility with one group of (at least one) program module 13205
13204, such program module 13205 includes but is not limited to:Operating system, one or more application program, other programs
Module and routine data, the realization of network environment may be included in each or certain combination in these examples.
Bus 1330 can be to represent the one or more in a few class bus structures, including memory cell bus or storage
Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures
Local bus.
Electronic equipment 1300 can also be with one or more external equipments 1500 (such as keyboard, sensing equipment, bluetooth equipment
Deng) communication, the equipment communication interacted with the electronic equipment 1300 can be also enabled a user to one or more, and/or with making
Obtain any equipment that the electronic equipment 1300 can be communicated with one or more of the other computing device (such as router, modulation
Demodulator etc.) communication.This communication can be carried out by input/output (I/O) interface 1350.Also, electronic equipment 1300
Network adapter 1360 and one or more network (such as LAN (LAN), wide area network (WAN) and/or public affairs can also be passed through
Common network network, such as internet) communication.As illustrated, network adapter 1360 passes through its of bus 1330 and electronic equipment 1300
Its module communicates.It should be understood that although not shown in the drawings, can combine electronic equipment 1300 uses other hardware and/or software
Module, include but is not limited to:Microcode, device driver, redundant processing unit, external disk drive array, RAID system, magnetic
Tape drive and data backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can be realized by software, can also be realized by way of software combines necessary hardware.Therefore, according to the present invention
The technical scheme of embodiment can be embodied in the form of software product, the software product can be stored in one it is non-volatile
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are to cause a calculating
Equipment (can be personal computer, server, terminal installation or network equipment etc.) is performed according to embodiment of the present invention
Method.
In addition, above-mentioned accompanying drawing is only the schematic theory of the processing included by method according to an exemplary embodiment of the present invention
It is bright, rather than limitation purpose.It can be readily appreciated that the time that above-mentioned processing shown in the drawings was not intended that or limited these processing is suitable
Sequence.In addition, being also easy to understand, these processing for example can be performed either synchronously or asynchronously in multiple modules.
It should be noted that although some modules or list of the equipment for action executing are referred in above-detailed
Member, but this division is not enforceable.In fact, according to the embodiment of the present invention, it is above-described two or more
Either the feature of unit and function can embody module in a module or unit.A conversely, above-described mould
Either the feature of unit and function can be further divided into being embodied by multiple modules or unit block.
Those skilled in the art will readily occur to the present invention its after considering specification and putting into practice invention disclosed herein
His embodiment.The application be intended to the present invention any modification, purposes or adaptations, these modifications, purposes or
Adaptations follow the general principle of the present invention and including undocumented common knowledge in the art of the invention or
Conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by claim
Point out.
It should be appreciated that the invention is not limited in the precision architecture for being described above and being shown in the drawings, and
And various modifications and changes can be being carried out without departing from the scope.The scope of the present invention is only limited by appended claim.
Claims (10)
1. one kind monitors fault handling method, applied to the system including message queue and information consumption end, it is characterised in that institute
Stating monitoring fault handling method includes:
Message listener and Message Processing application are decoupled at the information consumption end;
The message queue is monitored, unexpected message queue in the message queue be present if detected, by pre-
Routing gives the unexpected message queue notification management of monitor device at the information consumption end;
The management of monitor device determines message listener corresponding with the unexpected message queue as target monitor;
The target monitor is detected to restart the mesh in the case where detecting the target monitor failure
Mark monitor.
2. monitoring fault handling method according to claim 1, it is characterised in that should by message listener and Message Processing
Included with decoupling:
Message Processing application is registered;
Obtain the message transmission conditions from Message Processing application;
Message is sent to corresponding Message Processing application via message listener according to message transmission conditions.
3. monitoring fault handling method according to claim 2, it is characterised in that the monitoring fault handling method also wraps
Include:
Data transfer between message listener and Message Processing application is realized using RESTful frameworks.
4. monitoring fault handling method according to claim 1, it is characterised in that the exception is disappeared by pre- routing
Breath queue notification includes to the management of monitor device at the information consumption end:
The unexpected message queue notification is given to the management of monitor at the information consumption end by http protocol or RESTful interfaces
Device.
5. the monitoring fault handling method according to claim 1 or 4, it is characterised in that the unexpected message queue is team
The abnormal message queue of row length;
Wherein, the message queue is monitored including:
Judge whether the length of the message queue is abnormal.
6. monitoring fault handling method according to claim 1, it is characterised in that the management of monitor device determine with it is described
Message listener includes as target monitor corresponding to unexpected message queue:
The management of monitor device determines and the unexpected message according to the mapping table between message listener and message queue
Message listener corresponding to queue is as target monitor.
7. monitoring fault handling method according to claim 1, it is characterised in that the monitoring fault handling method also wraps
Include:
In the case where detecting the target monitor failure, alarm signal is sent.
8. one kind monitors fault processing system, including message queue and information consumption end, it is characterised in that at the monitoring failure
Reason system also includes:
Decoupling module, for decoupling message listener and Message Processing application at the information consumption end;
Queue monitoring module, for being monitored to the message queue, and exception in the message queue is detected be present
During message queue, the unexpected message queue notification is given to the management of monitor device at the information consumption end by pre- routing;
Management of monitor device, for determining message listener corresponding with the unexpected message queue as target monitor, to institute
Target monitor is stated to be detected to restart the target monitor in the case where detecting the target monitor failure.
9. a kind of storage medium, is stored thereon with computer program, it is characterised in that the computer program is executed by processor
Monitoring fault handling method any one of Shi Shixian claims 1 to 7.
10. a kind of electronic equipment, it is characterised in that including:
Processor;And
Memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to come any one of perform claim requirement 1 to 7 via the execution executable instruction
Monitoring fault handling method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711193568.XA CN107896172B (en) | 2017-11-24 | 2017-11-24 | Monitoring fault processing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711193568.XA CN107896172B (en) | 2017-11-24 | 2017-11-24 | Monitoring fault processing method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107896172A true CN107896172A (en) | 2018-04-10 |
CN107896172B CN107896172B (en) | 2020-06-09 |
Family
ID=61804599
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711193568.XA Active CN107896172B (en) | 2017-11-24 | 2017-11-24 | Monitoring fault processing method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107896172B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110224922A (en) * | 2019-05-21 | 2019-09-10 | 成都路行通信息技术有限公司 | A kind of asynchronous message based on RabbitMQ retries method, system and system constituting method |
CN111600779A (en) * | 2020-06-24 | 2020-08-28 | 厦门长江电子科技有限公司 | Test platform compatible with various switches |
CN111666170A (en) * | 2020-05-29 | 2020-09-15 | 中国工商银行股份有限公司 | Fault node processing method and device based on distributed framework |
CN111782414A (en) * | 2020-05-12 | 2020-10-16 | 北京皮尔布莱尼软件有限公司 | Delay message processing method and system |
CN111930530A (en) * | 2020-06-24 | 2020-11-13 | 山东浪潮通软信息科技有限公司 | Equipment message processing method, device and medium based on Internet of things |
CN113806163A (en) * | 2020-06-12 | 2021-12-17 | 航天信息股份有限公司 | System monitoring method, device, equipment and storage medium |
CN115426209A (en) * | 2022-11-07 | 2022-12-02 | 湖南三湘银行股份有限公司 | High-reliability message queue broadcast control method based on message processing |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103019866A (en) * | 2012-10-24 | 2013-04-03 | 北京京东世纪贸易有限公司 | Distributed method and system based on message queue |
CN103064731A (en) * | 2012-12-26 | 2013-04-24 | 人民搜索网络股份公司 | Device and method for improving message queue system performance |
US20140149997A1 (en) * | 2007-09-27 | 2014-05-29 | American Express Travel Related Services Company, Inc. | System and method for automatically generating computer code for message flows |
CN105868033A (en) * | 2016-04-06 | 2016-08-17 | 江苏物联网研究发展中心 | Method and system for achieving priority message queues based on Redis |
-
2017
- 2017-11-24 CN CN201711193568.XA patent/CN107896172B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140149997A1 (en) * | 2007-09-27 | 2014-05-29 | American Express Travel Related Services Company, Inc. | System and method for automatically generating computer code for message flows |
CN103019866A (en) * | 2012-10-24 | 2013-04-03 | 北京京东世纪贸易有限公司 | Distributed method and system based on message queue |
CN103064731A (en) * | 2012-12-26 | 2013-04-24 | 人民搜索网络股份公司 | Device and method for improving message queue system performance |
CN105868033A (en) * | 2016-04-06 | 2016-08-17 | 江苏物联网研究发展中心 | Method and system for achieving priority message queues based on Redis |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110224922A (en) * | 2019-05-21 | 2019-09-10 | 成都路行通信息技术有限公司 | A kind of asynchronous message based on RabbitMQ retries method, system and system constituting method |
CN110224922B (en) * | 2019-05-21 | 2022-04-19 | 成都路行通信息技术有限公司 | Asynchronous message retry method, system and system construction method based on RabbitMQ |
CN111782414A (en) * | 2020-05-12 | 2020-10-16 | 北京皮尔布莱尼软件有限公司 | Delay message processing method and system |
CN111782414B (en) * | 2020-05-12 | 2024-04-19 | 北京皮尔布莱尼软件有限公司 | Delay message processing method and system |
CN111666170A (en) * | 2020-05-29 | 2020-09-15 | 中国工商银行股份有限公司 | Fault node processing method and device based on distributed framework |
CN111666170B (en) * | 2020-05-29 | 2024-04-12 | 中国工商银行股份有限公司 | Fault node processing method and device based on distributed framework |
CN113806163A (en) * | 2020-06-12 | 2021-12-17 | 航天信息股份有限公司 | System monitoring method, device, equipment and storage medium |
CN111600779A (en) * | 2020-06-24 | 2020-08-28 | 厦门长江电子科技有限公司 | Test platform compatible with various switches |
CN111930530A (en) * | 2020-06-24 | 2020-11-13 | 山东浪潮通软信息科技有限公司 | Equipment message processing method, device and medium based on Internet of things |
CN111930530B (en) * | 2020-06-24 | 2024-04-30 | 浪潮通用软件有限公司 | Equipment message processing method, device and medium based on Internet of things |
CN115426209A (en) * | 2022-11-07 | 2022-12-02 | 湖南三湘银行股份有限公司 | High-reliability message queue broadcast control method based on message processing |
CN115426209B (en) * | 2022-11-07 | 2023-02-10 | 湖南三湘银行股份有限公司 | High-reliability message queue broadcast control method based on message processing |
Also Published As
Publication number | Publication date |
---|---|
CN107896172B (en) | 2020-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107896172A (en) | Monitor fault handling method and device, storage medium and electronic equipment | |
CN107294808B (en) | Interface test method, device and system | |
US11157392B2 (en) | Debugging through causality and temporal pattering in a event processing system | |
JP5872731B2 (en) | Computer implemented method, non-transitory computer readable medium and computer system for communicating detection of link failure to each of a plurality of nodes of a cluster | |
US11789760B2 (en) | Alerting, diagnosing, and transmitting computer issues to a technical resource in response to an indication of occurrence by an end user | |
US10445335B2 (en) | Computing environment connectivity system | |
US11734008B1 (en) | Reusable sets of instructions for responding to incidents in information technology environments | |
WO2019006654A1 (en) | Financial self-service equipment maintenance dispatch generation method, hand-held terminal and electronic device | |
US11405259B2 (en) | Cloud service transaction capsulation | |
US10313441B2 (en) | Data processing system with machine learning engine to provide enterprise monitoring functions | |
CN104579840A (en) | ZABBIX-based network monitoring system | |
US8966325B2 (en) | Identifying unreliable parts in an IT infrastructure | |
US9571350B2 (en) | Network element diagnostic evaluation | |
US10122602B1 (en) | Distributed system infrastructure testing | |
CN113760634A (en) | Data processing method and device | |
TWI448975B (en) | Dispersing-type algorithm system applicable to image monitoring platform | |
KR101433045B1 (en) | System and method for detecting error beforehand | |
JP2023537769A (en) | Fault location for cloud-native applications | |
US11416825B2 (en) | Managed rooms backbone | |
KR20130029250A (en) | Method and apparatus for requesting examination and fault detection | |
CN108322336A (en) | Intelligent management and system towards domestic autonomous controllable server | |
JP2007264907A (en) | Fault notification system, fault notification method, and fault notification program | |
CN116260747A (en) | Monitoring method and device of terminal test equipment and electronic equipment | |
US20240171601A1 (en) | Method for assurance and monitoring of continuous active security data availability | |
CN114302438B (en) | Method, device, equipment and storage medium for processing abnormality of network element |
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 |