Unlock instant, AI-driven research and patent intelligence for your innovation.

Message queue consumption speed control method and device, electronic equipment and medium

A message queue and speed control technology, applied in the computer field, can solve the problem of high algorithm complexity, achieve the effect of controlling the number of consumption threads and reducing the implementation complexity

Pending Publication Date: 2021-03-19
深圳市分期乐网络科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Although the existing methods for controlling the consumption speed of message queues, such as sliding window algorithm, leaky bucket algorithm and token bucket algorithm, can control the consumption speed of message queue per unit time, it is more complex to realize the above algorithms when the distributed system expands. high

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Message queue consumption speed control method and device, electronic equipment and medium
  • Message queue consumption speed control method and device, electronic equipment and medium
  • Message queue consumption speed control method and device, electronic equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0023] figure 1 It is a flow chart of the method for controlling the consumption speed of the message queue provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of controlling the consumption speed of the message queue. The method can be executed by a message queue consumption speed control device, which can be implemented in software and / or hardware, and can be configured in an electronic device, which can be an electronic device with communication and computing capabilities such as a server. Such as figure 1 As shown, the method specifically includes:

[0024] S110. Responding to the timed task start request, take out a first number of messages from the message queue; where the first number is the same as the number of fragmented tasks of the timed task.

[0025] Wherein, a scheduled task refers to a task executed based on a given time point, a given time interval, or a given number of executions. Exemplarily, the timing task i...

Embodiment 2

[0043] figure 2 It is a flow chart of the method for controlling the consumption speed of message queues provided by Embodiment 2 of the present invention. This embodiment is further optimized on the basis of the above embodiments. Before taking out the first number of messages from the queue, the method further includes: obtaining an instruction for updating the execution frequency of the scheduled task; and setting the execution frequency of the scheduled task according to the instruction for updating the execution frequency.

[0044] Such as figure 2 As shown, the method includes:

[0045] S210. Obtain an instruction to update the execution frequency of the scheduled task.

[0046] Wherein, the instruction for updating the execution frequency of the scheduled task refers to an instruction for adjusting the execution frequency of the scheduled task. For the timing task that is fragmented for the first time, the timing task execution frequency update instruction is used ...

Embodiment 3

[0054] image 3 It is a schematic structural diagram of a message queue consumption speed control device provided in Embodiment 3 of the present invention. This embodiment is applicable to the situation of controlling the consumption speed of a message queue. The device can be implemented by software and / or hardware, and can be configured in electronic equipment.

[0055] Such as image 3 As shown, the apparatus may include: a message fetching module 310 and a message processing module 320 .

[0056] The message fetching module 310 is configured to fetch a first number of messages from the message queue in response to the timing task start request; wherein, the first number is the same as the number of fragmented tasks of the timing task.

[0057] The message processing module 320 is configured to process the message through the fragment task.

[0058] In the technical solution provided by the embodiment of the present invention, a first number of messages is taken out from...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a message queue consumption speed control method and device, electronic equipment and a medium. The method comprises the steps of taking out a first number ofmessages from a message queue in response to a timing task starting request; wherein the first number is the same as the number of fragmentation tasks of the timing task; and processing the message through the fragmentation task. According to the embodiment of the invention, the message queue is combined with the timing task fragmentation, and the consumption speed of the message queue is controlled by controlling the number of the fragmentation tasks of the timing task, so that the implementation complexity of the control method of the consumption speed of the message queue is reduced, and meanwhile, the consumption thread number of the message can be effectively controlled.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, electronic device and medium for controlling consumption speed of message queues. Background technique [0002] After the message producer generates the message, it will send the message into the message queue, and then the message consumer will take the message out of the message queue for message consumption. Due to the limited load capacity of the message consumer, controlling the consumption speed of the message queue is of great significance to ensure the stability of the message consumer system and improve the work efficiency of the message consumer. [0003] Although the existing methods for controlling the consumption speed of message queues, such as sliding window algorithm, leaky bucket algorithm and token bucket algorithm, can control the consumption speed of message queue per unit time, it is more complex to realize th...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54
CPCG06F9/546G06F2209/548
Inventor 周鹏华
Owner 深圳市分期乐网络科技有限公司