Method and system for achieving priority message queues based on Redis

A message queue and priority technology, applied in the computer field, can solve problems such as inability to view, modify, and inconvenient expansion of message queue capacity, and achieve good flexibility

Inactive Publication Date: 2016-08-17
JIANGSU CAS JUNSHINE TECH +1
View PDF5 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, neither ActiveMQ nor RabbitMQ can view the content of the message and modify the priority and content i

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
  • Method and system for achieving priority message queues based on Redis
  • Method and system for achieving priority message queues based on Redis
  • Method and system for achieving priority message queues based on Redis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The present invention will be further described below in conjunction with specific drawings and embodiments.

[0027] Such as figure 1 Shown: in order to realize the message queue with priority function, the present invention includes write message module 2 and the Redis cluster 3 that is used for message queue storage and management, described write message module 2 is connected with Redis cluster 3 by connection pool module 4 ;

[0028] After the connection pool module 4 is connected with the Redis cluster 3, the message writing module 2 can write the message body in the Redis cluster 3, and the message body includes the queue name, message content and message priority, and the Redis cluster 3 writes the message in the message body The content is stored in the message list of the message queue corresponding to the queue name and message priority, and after the Redis cluster 3 stores the message content in the corresponding message list, the connection between the mes...

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 relates to a method and system for achieving priority message queues based on Redis. The system comprises a message write module and a Redis cluster. The message write module is connected with the Redis cluster through a connection pool module. After being connected with the Redis cluster through the connection pool module, the message write module can write message bodies into the Redis cluster, wherein each message body comprises a queue name, message content and a message priority, the Redis cluster stores the message content in the message bodies in message lists of the message queues corresponding to the queue names and the message priorities, and after the Redis cluster stores the message content in the corresponding message lists, connection between the message write module and the Redis cluster is released through the connection pool module. The message queues with the priority function are achieved through the lists of the Redis cluster, the message queues, the number of the message lists in the message queues and the corresponding message content can be checked in real time, and the priorities of the messages can be corrected in real time.

Description

technical field [0001] The present invention relates to a method and a system, in particular to a method and a system for implementing a priority message queue based on Redis, belonging to the technical field of computers. Background technique [0002] Currently, in order to asynchronously process operations in web application systems, message queues are usually used. The use of message queues can not only process operations asynchronously, but also reduce the peak value when the application visits are high, relieve system pressure, and reduce coupling between components. The priority message queue is based on the message queue to make each message have a priority, so that the messages with higher priority can be processed first, which has better flexibility and ease of use. [0003] Currently more commonly used message queues such as ActiveMQ and RabbitMQ can support the function of priority message queues. However, neither ActiveMQ nor RabbitMQ can view the content of 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
IPC IPC(8): G06F9/54
CPCG06F9/546
Inventor 张健刘斌台宪青
Owner JIANGSU CAS JUNSHINE TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products