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

Concurrent consumption method and device for message-oriented middleware

A message middleware and message technology, which is applied in multi-program devices, inter-program communication, instruments, etc., can solve the problems of message loss, message accumulation, and poor consumption ability of consumers, so as to improve the ability of concurrent processing and speed up and efficiency, time-saving effect

Pending Publication Date: 2021-01-05
CHINA UNIONPAY
View PDF0 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, in the same topic (topic) of the message queue kafka (a high-throughput distributed publish-subscribe message system) cluster, the performance of a single consumer is that each partition can only be consumed by one consumer, and the kafka cluster consumption The maximum number of consumers for an operator depends on the number of partitions. The number of partitions and the performance of a single consumer greatly constrain the consumer performance of the kafka cluster, resulting in poor consumption capabilities of consumers.
Especially when the system encounters high concurrent requests, because the consumption capacity of consumers does not keep up with the production capacity of producers, messages accumulate or even messages are lost

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
  • Concurrent consumption method and device for message-oriented middleware
  • Concurrent consumption method and device for message-oriented middleware
  • Concurrent consumption method and device for message-oriented middleware

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0054] Such as figure 1 As shown, in a specific implementation manner, a message concurrent processing method of message middleware is provided, including:

[0055] Step S110: the consumer thread extracts the message from the message queue, and stores the extracted message in the cache queue;

[0056]Step S120: Use the worker threads in the thread pool to concurren...

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 message concurrent processing method and device for message-oriented middleware. The specific implementation scheme is that the method comprises the following steps: enablinga consumption thread to extract a message from a message queue, and storing the extracted message in a cache queue; and concurrently processing the messages in the cache queue by adopting the workingthreads in a thread pool, and returning to execute the step of extracting the messages from the message queue by the consumption thread and storing the extracted messages into the cache queue until the messages in the message queue are processed. Since the consumption thread does not execute the service logic and only extracts the message into the cache queue, the performance of a single consumption thread can be significantly improved. The messages are concurrently processed by utilizing a large number of working threads in the thread pool while being stored in the cache queue, so that the time is saved, and the speed and efficiency of concurrently processing the messages are improved. The messages in the cache queue are concurrently processed by utilizing a large number of working threads in the thread pool, so that the concurrent processing capability of a large number of messages is obviously improved.

Description

technical field [0001] This application relates to the field of big data, in particular to the field of concurrent consumption of message middleware. Background technique [0002] Messaging middleware extends inter-process communication in a distributed environment by providing message passing and message queuing models. In the actual application environment, such as SMS notification service, data statistics service, etc., all rely on message middleware to consume this message to complete their own business logic. For message middleware, common roles include producer, consumer, and message queue. Among them, in the thread world, the producer is the thread that produces the message, also called the production thread. A consumer is a thread that consumes messages, also called a consumer thread. Message (Message) refers to data transmitted between applications. Messages can be as simple as just text strings, or more complex and may contain embedded objects. Message queuing...

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/546
Inventor 石力丰朋吴丰科
Owner CHINA UNIONPAY
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