A Configuration-Based Message Queue Component and Its Integration Method

A message queue and message technology, applied in the direction of software design, etc., can solve the problems of cumbersome use and configuration information, increase the risk of replacement, and the lack of transparency of the user, so as to achieve enhanced concurrent throughput, realize link disconnection and reconnection, and ensure availability Effect

Active Publication Date: 2020-07-28
CHEZHI HULIAN BEIJING SCI & TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, the use and configuration information in the process of message production and consumption is cumbersome, requiring the user to understand its calling and configuration methods, which is not transparent to the user. Moreover, the client is highly coupled with the MQ product, and the software system depends on the specified MQ product. Inconvenience for later replacement and increased risk of replacement

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
  • A Configuration-Based Message Queue Component and Its Integration Method
  • A Configuration-Based Message Queue Component and Its Integration Method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0027] like figure 1 As shown, the embodiment of the present invention provides a configuration-based message queue component, including: an MQ management module, and an MQ processing thread pool, a message service module, and an MQ service availability monitoring module connected to the MQ management module data; The MQ management module is the core management class of the whole message, which is used for the production of the message, the monitoring of the consumer end and the management of the thread pool; the MQ processing thread pool is used for scheduling and managing multi-threads, enhancing the concurrent throughput; The message service module is used to provide API services open to the outside world. The user can realize the production of messages by introducing the service. The message service module includes a message body and a message listener. The message body is a custom annotation for loading The configuration information of the queue is registered, and the mes...

Embodiment 2

[0033] like figure 2 As shown, the embodiment of the present invention provides a configuration-based message queue component integration method, including the following steps:

[0034] S1, introduce components into the project through maven;

[0035] S2, add a message annotation to the body of the sendTask method, and the message listener will automatically listen to the message to realize automatic registration;

[0036] S3, in the business project that needs to be consumed, create a business monitoring class, and implement the MessageListener message listener interface, write the consumption business in the monitoring method, configure the message annotation on the monitoring method body, realize the binding of the consumption business, and realize the consumption end Automatic registration.

[0037] The above three steps can introduce MQ services into business projects. Based on the principles of configuration, high cohesion, low coupling, and shielding of underlying de...

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 configuration-based message queue component and an integration method thereof, and relates to the technical field of concurrent data processing. A message service module is set in the component; the message service module comprises a message body and a message monitor; the message body is a self-defined note and is used for loading and registering configuration information of a queue; the message monitor is an externally-opened SPI; a using party can realize a monitoring method in the message monitor according to a specific business logic; after the component is integrated, an integrated MQ message queue becomes lightweight and a queue service can be integrated through simple configuration; and decoupling with MQ products is realized, so that the replacement of non-perception MQ products can be realized.

Description

technical field [0001] The invention relates to the technical field of concurrent data processing, in particular to a configuration-based message queue component and an integrated method thereof. Background technique [0002] The high concurrency of Internet companies has led many companies to introduce message queuing services as buffers for concurrent traffic. Among them, the widely used message queue servers include: RabbitMQ, ActiveMQ, Kafka, etc. Among these servers, the MQ product provides a custom invocation client, and the production and consumption of messages can be easily realized based on the client. [0003] However, the use and configuration information in the process of message production and consumption is cumbersome, requiring the user to understand its calling and configuration methods, which is not transparent to the user. Moreover, the client is highly coupled with the MQ product, and the software system depends on the specified MQ product. It brings in...

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 & AuthorityPatents(China)
IPC IPC(8): G06F8/20
CPCG06F8/24
Inventor尹召华
OwnerCHEZHI HULIAN BEIJING SCI & TECH CO LTD