CN111694677A - Message queue management method, device, terminal and computer-readable storage medium - Google Patents

Message queue management method, device, terminal and computer-readable storage medium Download PDF

Info

Publication number
CN111694677A
CN111694677A CN202010390128.9A CN202010390128A CN111694677A CN 111694677 A CN111694677 A CN 111694677A CN 202010390128 A CN202010390128 A CN 202010390128A CN 111694677 A CN111694677 A CN 111694677A
Authority
CN
China
Prior art keywords
message queue
message
consumer process
messages
consumer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010390128.9A
Other languages
Chinese (zh)
Inventor
梁念
蔡泽键
李鉴庭
韩立炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Muchenglin Technology Co ltd
Original Assignee
Shenzhen Muchenglin 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 Shenzhen Muchenglin Technology Co ltd filed Critical Shenzhen Muchenglin Technology Co ltd
Priority to CN202010390128.9A priority Critical patent/CN111694677A/en
Publication of CN111694677A publication Critical patent/CN111694677A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a management method, a device, a terminal and a computer-readable storage medium of a message queue, wherein the management method of the message queue comprises the following steps: acquiring messages stored in a message queue pre-established by a message queue background management system; detecting whether the number of messages which are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold value or not; if the number of messages which are not consumed in the messages stored in the message queue is larger than the preset message consumption threshold value, message blocking prompt information is output; the management of the consumption condition and the accumulation condition of the message queue is realized, and the global runaway of the system caused by message blocking is avoided.

Description

Message queue management method, device, terminal and computer-readable storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a method and an apparatus for managing a message queue, a terminal, and a computer-readable storage medium.
Background
The message queue is a container for storing messages in a message process, and can well solve the problems of system coupling, message asynchronization and the like in a system development process, so that the message queue is widely applied to system development.
However, in the current system development process, message queues, messages, and the like are directly created in codes, so that a terminal cannot acquire information related to the messages and the message queues, it is difficult to manage consumption conditions and accumulation conditions of the message queues, once message blocking occurs, messages stored in the message queues are continuously accumulated, system applications cannot normally run, and global runaway of the system is caused.
Disclosure of Invention
The embodiment of the application provides a method and a device for managing a message queue, a terminal and a computer-readable storage medium, which can solve the problem that the terminal cannot manage the consumption condition and the accumulation condition of the message queue and avoid global runaway of a system caused by message blocking.
A first aspect of the embodiments of the present application provides a method for managing a message queue, including:
acquiring messages stored in a message queue pre-established by a message queue background management system;
detecting whether the number of messages which are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold value or not;
and if the number of messages which are not consumed in the messages stored in the message queue is greater than the preset message consumption threshold, outputting message blocking prompt information.
A second aspect of the embodiments of the present application provides a management apparatus for a message queue, including:
the acquisition unit is used for acquiring messages stored in a message queue created in advance by a message queue background management system;
the detection unit is used for detecting whether the number of messages which are not consumed in the messages stored in the message queue is larger than a preset message consumption threshold value or not;
and the prompting unit is used for outputting message blocking prompting information if the number of messages which are not consumed in the messages stored in the message queue is greater than the preset message consumption threshold value.
A third aspect of the embodiments of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the above method.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a terminal device, causes the terminal device to perform the steps of the method.
In the embodiment of the application, the message queue is pre-created in the message queue background management system and is used for storing messages, so that the creation of the message queue is realized, and the message queue is separated from the creation of a consumer process, so that the terminal can acquire the messages stored in the message queue pre-created by the message queue background management system and output message blocking prompt information when the number of messages which are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold value, namely, the message queue and the messages are uniformly stored by the message queue background management system, the centralized management of the consumption condition and the accumulation condition of the messages stored in the message queue by the terminal is realized, the global runaway of the system caused by the message blocking in the message queue is avoided, and a developer can conveniently perform system research and development.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a first implementation of a method for managing a message queue according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an implementation process for creating a message queue through a message queue background management system according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a second implementation of a method for managing a message queue according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a management apparatus for a message queue according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
The message queue is a container for storing messages in a message process, and can well solve the problems of system coupling, message asynchronization and the like in a system development process, so that the message queue is widely applied to system development.
However, in the current system development process, message queues, messages, and the like are directly created in codes, so that a terminal cannot acquire information related to the messages and the message queues, it is difficult to manage consumption conditions and accumulation conditions of the message queues, once message blocking occurs, messages stored in the message queues are continuously accumulated, system applications cannot normally run, and global runaway of the system is caused.
Based on this, embodiments of the present application provide a method, an apparatus, a terminal, and a computer-readable storage medium for managing a message queue, which can implement management of consumption and accumulation of the message queue.
In order to explain the technical means of the present application, the following description will be given by way of specific examples.
Fig. 1 shows a schematic flow chart of an implementation of a method for managing a message queue according to an embodiment of the present application, where the method can be applied to a terminal, can be executed by a management device of the message queue configured on the terminal, and is suitable for managing consumption and accumulation conditions of the message queue, so as to avoid a situation of global runaway of a system caused by message blocking. The terminal can be an intelligent terminal such as a smart phone and a computer. The above message queue management method may include steps 101 to 103.
Step 101, obtaining a message stored in a message queue created in advance by a message queue background management system.
In order to avoid that a message queue and a message are directly created in a code, and therefore when the message queue needs to be managed, a terminal cannot acquire the message queue or the message stored in the message queue, in an embodiment of the present application, a message queue may be created in a message queue background management system, and the message queue is used to store the message. Because the establishment of the message queue and the establishment of the consumer process are separated from each other, when the message queue needs to be managed, the terminal can directly acquire the messages stored in the message queue which is established in advance by the message queue background management system.
Specifically, as shown in fig. 2, the creating a message queue by the message queue background management system, and storing the message by using the message queue may include: step 201 to step 202.
Step 201, creating a message rule in a message queue background management system.
Specifically, the terminal may obtain message rule information configured by the developer, and create a message rule in the message queue background management system according to the message rule information, so as to match the message with the message rule by using the message rule.
Step 202, creating a message queue bound with message rules in a message queue background management system.
The message queue is used for storing messages meeting message rules corresponding to the message queue.
In some embodiments of the present application, after the message queue background management system creates the message rule and the message queue, the terminal may bind the message rule for each message queue in the message queue background management system, and when the message produced by the producer process conforms to the message rule corresponding to the message queue, the message may be stored in the message queue corresponding to the message rule to which the message conforms.
It should be noted that the same message may simultaneously conform to the message rules respectively corresponding to the multiple message queues, and when the message simultaneously conforms to the message rules respectively corresponding to the multiple message queues, the terminal may store the message in each of the multiple message queues at the same time.
After the message queue background management system creates the message rule and the message queue bound with the message rule, the message queue background management system stores the message queue and the message in a unified manner, at this time, the terminal can define a message queue acquisition interface function, and acquire the message stored in the message queue created in advance by the message queue background management system by using the message queue acquisition interface function, so as to realize the management of the message queue.
Step 102, detecting whether the number of messages which are not consumed in the messages stored in the message queue is larger than a preset message consumption threshold value.
The preset message consumption threshold is the number value of messages which are not consumed and are stored in the current message queue under the condition that the message queue is not abnormal.
In the embodiment of the application, whether the number of messages which are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold value is detected, and if the number of the messages which are not consumed in the messages stored in the message queue is greater than the preset message consumption threshold value, it is indicated that the messages which are consumed but not consumed exist in the message queue, namely, message sending blockage exists, so that the terminal can determine that the message queue runs abnormally and needs to process the abnormal messages in the message queue; if the number of messages which are not consumed in the messages stored in the message queue is less than or equal to the preset message consumption threshold, it is indicated that no message which is consumed but not consumed exists in the message queue, that is, the message is not sent and blocked, so that the terminal can determine that the message queue operates normally without exception processing.
And 103, if the number of messages which are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold value, outputting message blocking prompt information.
In some embodiments of the present application, the terminal may generate a message blocking notification message according to a message that is not consumed in the messages stored in the message queue, and output the message blocking notification message to the administrator through the instant messaging application.
For example, when the number of messages that are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold, the terminal may output message blocking prompt information to an administrator through a short message or a micro message.
In the embodiment of the application, the message queue is pre-created in the message queue background management system and is used for storing messages, so that the creation of the message queue is realized, and the message queue is separated from the creation of a consumer process, so that the terminal can acquire the messages stored in the message queue pre-created by the message queue background management system and output message blocking prompt information when the number of messages which are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold value, namely, the message queue and the messages are uniformly stored by the message queue background management system, the centralized management of the consumption condition and the accumulation condition of the messages stored in the message queue by the terminal is realized, the global runaway of the system caused by the message blocking in the message queue is avoided, and a developer can conveniently perform system research and development.
After the terminal creates a message queue bound with the message rule in a message queue background management system and stores the messages meeting the message rule corresponding to the message queue into the message queue, each system application can consume the messages stored in the message queue by creating a consumer process. However, in the current system development process, the consumer process is often created together with the message queue, the message, and the message rule in the code, so that the terminal cannot acquire the related information of the consumer process, and the consumer process is difficult to manage.
In order to solve the problem, in some embodiments of the present application, the terminal may obtain the consumer process configuration information in advance, and configure the consumer process in the message queue background management system according to the consumer process configuration information, so as to implement mutual separation of the creation of the consumer process, the creation of the message queue, and the creation of the message rule, so that the terminal may obtain the information related to the consumer process through the message queue background management system, and manage the survival condition of the consumer process.
Specifically, as shown in fig. 3, the acquiring, by the message queue background management system, the information related to the consumer process to manage the consumer process may include steps 301 to 303.
Step 301, consumer process information pre-configured by the message queue background management system is obtained.
In some embodiments of the present application, after the message queue background management system completes configuration of a consumer process, the terminal may define a consumer process information obtaining interface function, and obtain, by using the consumer process information obtaining interface function, consumer process information configured in advance by the message queue background management system.
Step 302, detecting whether the consumer process corresponding to the consumer process information is abnormally closed.
Specifically, in some embodiments of the application, the terminal may determine that the consumer process corresponding to the consumer process information is abnormally closed by detecting whether the number of the consumer processes corresponding to the consumer process information is smaller than a preset process number threshold, and when the number of the consumer processes is smaller than the preset process number threshold.
The preset process quantity threshold is a consumer process quantity value currently used for consuming the messages stored in the message queue under the condition that no exception occurs. When the number of the consumer processes is smaller than the preset process number threshold, it is indicated that the current actual number of the consumer processes is smaller than the number value of the consumer processes currently used for consuming the messages stored in the message queue under the condition that no exception occurs, and therefore, it can be determined that the consumer processes corresponding to the consumer process information are abnormally closed.
When the number of the consumer processes is equal to the preset process number threshold, it is indicated that the current actual number of the consumer processes is equal to the number value of the consumer processes currently used for consuming the messages stored in the message queue under the condition that no exception occurs, and therefore, it can be determined that the consumer processes corresponding to the consumer process information are not closed abnormally.
Step 303, if the consumer process corresponding to the consumer process information is abnormally closed, the consumer process corresponding to the consumer process information is restarted.
In some embodiments of the application, when the consumer process is abnormally closed, if the consumer process is not timely processed, the message stored in the message queue is easily blocked to affect normal operation of the system, and therefore, if the consumer process corresponding to the consumer process information is abnormally closed, the terminal can restart the consumer process corresponding to the consumer process information.
In other embodiments of the present application, when the message queue background management system pre-configures a consumer process, the terminal may configure a parent consumer process first, then configure a child consumer process of the parent consumer process, and consume a message in the message queue by the child consumer process. At this time, the terminal may detect whether the child consumer process of the parent consumer process is abnormally closed through the parent consumer process, and when the child consumer process is abnormally closed, the parent consumer process of the child consumer process directly restarts the child consumer process.
It should be noted that the terminal may obtain a preset monitoring script, and manage the consumer process by using the method shown in fig. 3 according to the preset monitoring time length of the monitoring script, so as to implement the timing monitoring and automatic management of the message queue.
In the embodiment of the application, the consumer process is pre-configured in the message queue background management system, the creation of the consumer process, the creation of the message queue and the creation of the message rule are separated from each other, so that the terminal can acquire the consumer process information pre-configured in the message queue background management system, and when the consumer process corresponding to the consumer process information is abnormally closed, the consumer process corresponding to the consumer process information is restarted, namely, the consumer process information is uniformly stored through the message queue background management system, the centralized management of the survival condition of the consumer process by the terminal is realized, the message blockage caused by abnormal closing of the consumer process is avoided, and the management of the message queue is realized.
Generally, when a message queue, a message and a consumer process are created directly in a code, a terminal needs to use a uniform code language and operate under a uniform operating system to realize normal operation of the message queue.
In the embodiment of the application, the terminal stores the message queue, the message and the consumer process information in a unified manner through the message queue background management system, so that the management of the message queue and the realization of the message queue are decoupled from each other, therefore, under different operating systems and terminals using different code languages, the message stored in the message queue created in advance by the message queue background management system can be acquired through the message queue acquisition interface function, and the consumer process information configured in advance by the message queue background management system can also be acquired through the message queue acquisition interface function, so that the message queue can be managed in a cross-language and cross-operating system manner under the condition that the realization of the message queue is not influenced.
It should be noted that, for simplicity of description, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders.
As shown in fig. 4, which is a schematic structural diagram of a management apparatus 400 for a message queue according to an embodiment of the present application, the management apparatus 400 for a message queue may include: an acquisition unit 401, a detection unit 402 and a presentation unit 403.
An obtaining unit 401, configured to obtain a message stored in a message queue created in advance by a message queue background management system;
a detecting unit 402, configured to detect whether the number of messages that are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold;
a prompting unit 403, configured to output a message blocking prompting message if the number of messages that are not consumed in the messages stored in the message queue is greater than the preset message consumption threshold.
In some embodiments of the present application, the management apparatus of the message queue further includes a creating unit, configured to: establishing a message rule in the message queue background management system; creating a message queue bound with the message rule in the message queue background management system; the message queue is used for storing messages meeting the message rule corresponding to the message queue.
In some embodiments of the present application, the management apparatus of the message queue further includes a process management unit, configured to: acquiring consumer process information pre-configured by a message queue background management system; detecting whether the consumer process corresponding to the consumer process information is abnormally closed or not; and if the consumer process corresponding to the consumer process information is abnormally closed, restarting the consumer process corresponding to the consumer process information.
In some embodiments of the present application, the process management unit is further specifically configured to: detecting whether the number of consumer processes corresponding to the consumer process information is smaller than a preset process number threshold value or not; and if the number of the consumer processes is smaller than the preset process number threshold, determining that the consumer processes corresponding to the consumer process information are abnormally closed.
In some embodiments of the present application, the consumer process comprises: the process management unit is further specifically configured to: detecting, by the parent consumer process, whether a child consumer process of the parent consumer process is abnormally shut down.
It should be noted that, for convenience and simplicity of description, the specific working process of the management apparatus 400 for a message queue described above may refer to the corresponding process of the method described in fig. 1 to fig. 3, and is not described herein again.
Fig. 5 is a schematic diagram of a terminal according to an embodiment of the present application. The terminal 5 may include: a processor 50, a memory 51 and a computer program 52, such as a manager of message queues, stored in said memory 51 and operable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the above-described embodiments of the method for managing a respective message queue, such as the steps 101 to 103 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of each module/unit in each device embodiment described above, for example, the functions of the units 401 to 403 shown in fig. 4.
The computer program may be divided into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program in the terminal. For example, the computer program may be divided into an acquisition unit, a detection unit, and a prompt unit, and each unit may specifically function as follows: the acquisition unit is used for acquiring messages stored in a message queue created in advance by a message queue background management system; the detection unit is used for detecting whether the number of messages which are not consumed in the messages stored in the message queue is larger than a preset message consumption threshold value or not; and the prompting unit is used for outputting message blocking prompting information if the number of messages which are not consumed in the messages stored in the message queue is greater than the preset message consumption threshold value.
The terminal can be a mobile terminal such as a smart phone or a computing device such as a desktop computer, a notebook, a palm computer and a cloud server. The terminal may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is only an example of a terminal and is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or different components, e.g., the terminal may also include input-output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal. The memory 51 may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal. The memory 51 is used for storing the computer program and other programs and data required by the terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for managing a message queue, comprising:
acquiring messages stored in a message queue pre-established by a message queue background management system;
detecting whether the number of messages which are not consumed in the messages stored in the message queue is greater than a preset message consumption threshold value or not;
and if the number of messages which are not consumed in the messages stored in the message queue is greater than the preset message consumption threshold, outputting message blocking prompt information.
2. The method for managing the message queue according to claim 1, wherein before acquiring the messages stored in the message queue created by the message queue background management system in advance, the method comprises:
establishing a message rule in the message queue background management system;
creating a message queue bound with the message rule in the message queue background management system; the message queue is used for storing messages meeting the message rule corresponding to the message queue.
3. The method of managing a message queue of claim 1, further comprising:
acquiring consumer process information pre-configured by a message queue background management system;
detecting whether the consumer process corresponding to the consumer process information is abnormally closed or not;
and if the consumer process corresponding to the consumer process information is abnormally closed, restarting the consumer process corresponding to the consumer process information.
4. The method for managing message queue according to claim 3, wherein the detecting whether the consumer process corresponding to the consumer process information is abnormally closed comprises:
detecting whether the number of consumer processes corresponding to the consumer process information is smaller than a preset process number threshold value or not;
and if the number of the consumer processes is smaller than the preset process number threshold, determining that the consumer processes corresponding to the consumer process information are abnormally closed.
5. A method of managing a message queue as claimed in claim 3, wherein the consumer process comprises: a parent consumer process and a child consumer process of the parent consumer process; the detecting whether the consumer process corresponding to the consumer process information is abnormally closed includes:
detecting, by the parent consumer process, whether a child consumer process of the parent consumer process is abnormally shut down.
6. An apparatus for managing a message queue, comprising:
the acquisition unit is used for acquiring messages stored in a message queue created in advance by a message queue background management system;
the detection unit is used for detecting whether the number of messages which are not consumed in the messages stored in the message queue is larger than a preset message consumption threshold value or not;
and the prompting unit is used for outputting message blocking prompting information if the number of messages which are not consumed in the messages stored in the message queue is greater than the preset message consumption threshold value.
7. The message queue management apparatus according to claim 6, wherein the management apparatus further comprises a creation unit operable to: establishing a message rule in the message queue background management system; creating a message queue bound with the message rule in the message queue background management system; the message queue is used for storing messages meeting the message rule corresponding to the message queue.
8. The message queue management apparatus according to claim 6, wherein the management apparatus further comprises a process management unit operable to: acquiring consumer process information pre-configured by a message queue background management system; detecting whether the consumer process corresponding to the consumer process information is abnormally closed or not; and if the consumer process corresponding to the consumer process information is abnormally closed, restarting the consumer process corresponding to the consumer process information.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202010390128.9A 2020-05-08 2020-05-08 Message queue management method, device, terminal and computer-readable storage medium Pending CN111694677A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010390128.9A CN111694677A (en) 2020-05-08 2020-05-08 Message queue management method, device, terminal and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010390128.9A CN111694677A (en) 2020-05-08 2020-05-08 Message queue management method, device, terminal and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN111694677A true CN111694677A (en) 2020-09-22

Family

ID=72477498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010390128.9A Pending CN111694677A (en) 2020-05-08 2020-05-08 Message queue management method, device, terminal and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111694677A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612631A (en) * 2020-12-29 2021-04-06 杭州涂鸦信息技术有限公司 Message queue accumulation detection method and related device
CN112965875A (en) * 2021-03-09 2021-06-15 中消云(北京)物联网科技研究院有限公司 Message queue monitoring method and device
CN113014511A (en) * 2021-03-12 2021-06-22 神彩科技股份有限公司 Data processing method and device, electronic equipment and storage medium
CN113676398A (en) * 2021-08-26 2021-11-19 深信服科技股份有限公司 Data recovery method, device and equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878197A (en) * 2017-02-22 2017-06-20 郑州云海信息技术有限公司 A kind of management system and method for the transmission of cloud platform message
CN107528922A (en) * 2017-09-29 2017-12-29 深圳市金立通信设备有限公司 A kind of information push method, terminal and computer-readable recording medium
CN109240836A (en) * 2018-09-06 2019-01-18 郑州云海信息技术有限公司 A kind of method and apparatus for configuring the message of message queue
CN110532105A (en) * 2018-05-25 2019-12-03 优信拍(北京)信息科技有限公司 A kind of control method, system and the device of message queue consumer process
CN110968430A (en) * 2018-09-28 2020-04-07 北京京东尚科信息技术有限公司 Message queue-based processing method and message queue

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878197A (en) * 2017-02-22 2017-06-20 郑州云海信息技术有限公司 A kind of management system and method for the transmission of cloud platform message
CN107528922A (en) * 2017-09-29 2017-12-29 深圳市金立通信设备有限公司 A kind of information push method, terminal and computer-readable recording medium
CN110532105A (en) * 2018-05-25 2019-12-03 优信拍(北京)信息科技有限公司 A kind of control method, system and the device of message queue consumer process
CN109240836A (en) * 2018-09-06 2019-01-18 郑州云海信息技术有限公司 A kind of method and apparatus for configuring the message of message queue
CN110968430A (en) * 2018-09-28 2020-04-07 北京京东尚科信息技术有限公司 Message queue-based processing method and message queue

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
庞佳丽: "分布式系统中基于中间件的异步通信可靠性研究" *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612631A (en) * 2020-12-29 2021-04-06 杭州涂鸦信息技术有限公司 Message queue accumulation detection method and related device
CN112612631B (en) * 2020-12-29 2024-04-02 杭州涂鸦信息技术有限公司 Message queue accumulation detection method and related device
CN112965875A (en) * 2021-03-09 2021-06-15 中消云(北京)物联网科技研究院有限公司 Message queue monitoring method and device
CN113014511A (en) * 2021-03-12 2021-06-22 神彩科技股份有限公司 Data processing method and device, electronic equipment and storage medium
CN113676398A (en) * 2021-08-26 2021-11-19 深信服科技股份有限公司 Data recovery method, device and equipment and readable storage medium
CN113676398B (en) * 2021-08-26 2023-11-03 深信服科技股份有限公司 Data recovery method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN111694677A (en) Message queue management method, device, terminal and computer-readable storage medium
CN108566290B (en) Service configuration management method, system, storage medium and server
CN112311617A (en) Configured data monitoring and alarming method and system
US10509689B2 (en) Method for processing application and terminal
CN110362455B (en) Data processing method and data processing device
US20200389402A1 (en) Augmenting functionality in distributed systems with payload headers
CN110515795B (en) Big data component monitoring method and device and electronic equipment
CN113704065A (en) Monitoring method, device, equipment and computer storage medium
CN112148700A (en) Log data processing method and device, computer equipment and storage medium
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN113377626B (en) Visual unified alarm method, device, equipment and medium based on service tree
WO2019109519A1 (en) Service rule management method, apparatus and device, and computer-readable storage medium
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
CN111651595A (en) Abnormal log processing method and device
CN111967850B (en) Data reporting monitoring method and device and electronic equipment
CN111343267B (en) Configuration management method and system
CN108595685B (en) Data processing method and device
CN111953569A (en) State information reporting method, device, equipment and medium
CN114928603B (en) Upgrading method and device of client software, electronic equipment and medium
CN114157662B (en) Cloud platform parameter adaptation method, device, terminal equipment and storage medium
CN112910855B (en) Sample message processing method and device
CN113656378A (en) Server management method, device and medium
CN112612592A (en) Configurable timed task processing method, device, equipment and storage medium
CN113127051B (en) Application resource packaging process monitoring method, device, equipment and medium
CN111045723B (en) Method and device for notifying code change between associated systems

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
CB02 Change of applicant information

Address after: 518000 Room 01, 20th Floor, Cuilin Building, No. 10, Kaifeng Road, Maling Community, Meilin Street, Futian District, Shenzhen, Guangdong

Applicant after: Shenzhen Handhui Technology Group Co.,Ltd.

Address before: 518000 20 / F, Cuilin building, 10 Kaifeng Road, Maling community, Meilin street, Futian District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen muchenglin Technology Co.,Ltd.

CB02 Change of applicant information