Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Consumption equilibrium method and system based on message queues

A technology of message queue and balancing method, applied in the field of consumption balancing based on message queue

Inactive Publication Date: 2016-02-03
INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF5 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since the producer and the consumer are designed and developed by the same development team in most cases, the consumption balance can only be maintained under the premise that the producer and the consumer are strictly set to operate according to the uniform polling method

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
  • Consumption equilibrium method and system based on message queues
  • Consumption equilibrium method and system based on message queues
  • Consumption equilibrium method and system based on message queues

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0039] The technical solutions of the present invention will be described in detail below in conjunction with the embodiments.

[0040] The invention is figure 1 On the basis of the message queue system, the automatic consumption balance on the consumer side is realized without considering the number of messages required by the consumer or the strategy used by the producer to send messages to the message queue. There is no need to consider the potential risks of downtime. That is to say, in various situations of the present invention, the consumer side can directly face the actual situation of each message queue, and automatically realize relatively balanced consumption of each message queue.

[0041] The invention discloses a consumption balancing method based on message queues, such as Figure 2A , 2B Shown is a flowchart of the method, the method comprising:

[0042] S1, sorting step, the consumer sorts the multiple message queues in real time according to the number of...

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 invention discloses a consumption equilibrium method and system based on message queues. The method comprises: an ordering step: a consumer client orders multiple message queues in real time according to numbers of non-consumption messages of the multiple message queues; and a consumption step: when any thread executed by the consumer client requires a consumption message, and with the message queue having the largest number of the non-consumption messages as a target queue, a message is obtained from the target queue for consumption. By adopting the consumption equilibrium method in the technical scheme of the invention, no matter a producer client generates the message in which policy, or whether the consumer client draws the same number of messages at each time, or whether a server has a downtime, the consumption equilibrium method disclosed by the invention can be used for guaranteeing that the message queue having the largest non-consumption number is consumed at the next consumption, maintaining the consumption equilibrium of the entire message queue and preventing the message backlog phenomenon of a certain message queue.

Description

technical field [0001] The invention relates to the technical field of computer communication based on message queues, in particular to a consumption balancing method and system based on message queues. Background technique [0002] Message queuing system (also known as message middleware) is widely used in various Internet companies. As a buffer mechanism for messages, it can effectively reduce the pressure on the company's backend server. [0003] The structural diagram of a typical message queue system is as follows: figure 1 As shown, it consists of three parts: [0004] 1. Producer end: the terminal responsible for sending messages to the message queue. [0005] 2. Consumer end: the terminal that obtains messages from the message queue. [0006] 3. Message queue: middleware for storing messages. Generally speaking, the middleware of the message queue system includes multiple message queues, and these message queues are used to store messages sent from the producer....

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
IPC IPC(8): H04L29/08G06Q10/06
CPCG06Q10/0631G06Q10/06316H04L67/568Y02D30/50
Inventor 程学旗欧陈庚张敬亮宋凯凯
Owner INST OF COMPUTING TECH CHINESE ACAD OF SCI
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products