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

Message processing method and device, electronic equipment and readable storage medium

A message processing and message technology, applied in the field of data processing, can solve problems such as blocking and affecting the message consumption efficiency of message queues

Active Publication Date: 2020-08-25
BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF8 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, when a large number of messages remain in the message queue for some reason (for example, the consumer server takes a long time to process the message), in this case, the production server must pause and wait (that is, block the producer thread), thereby affecting the message Consumption efficiency of messages in the queue

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 processing method and device, electronic equipment and readable storage medium
  • Message processing method and device, electronic equipment and readable storage medium
  • Message processing method and device, electronic equipment and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.

[0027] refer to figure 1 , figure 1 It is a system architecture diagram in the prior art. The system architecture includes a production server, a storage server, a consumption server 1 and a consumption server 2 as an example. The production server publishes messages to the message queue of the storage server. There can be at least one message queue of the storage server. Each message queue stores messages of a business type, and each business type is a business scenario. For example, message queue 1 stores information about For the message of liking the video, the message queue 2 stores the message about commenting on the video. In the prior art, if consumer server 1 is configured to take out messages from message queue 1, and consumer server 2 is configured to take out messages from message queue 2,...

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 provides a message processing method and device, electronic equipment and a readable storage medium. The method comprises the following steps: receiving a first messagesent by the production server, storing the first message in a message queue corresponding to the service type of the first message, obtaining M first messages from the message queue, writing each first message into a first memory buffer queue corresponding to the first target service identifier by adopting M first threads, determining a first target service address associated with the first target service identifier, and reading the N first messages in the first memory buffer queue by adopting the N second threads, and sending the N first request messages to a target server corresponding to the first target service address so as to call the service corresponding to the target server for N times to process the N first messages. Therefore, quick reading operation can be realized, accumulation of the messages in the message queue is avoided to a certain extent, and the consumption efficiency of the messages in the message queue is improved.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a message processing method, device, electronic equipment and a readable storage medium. Background technique [0002] Because the system based on the microservice architecture is easy to develop and maintain, it has been applied to the development of larger projects. At the same time, in order to realize the coupling between microservices, asynchronous message processing, current limiting and peak shaving and other functions, the production and consumption mode is usually applied. [0003] The production and consumption mode is specifically: the server that publishes the message (production server) publishes the message to the message queue (MQ, Message Queue) in the production server cluster, a message queue is a buffer, and the server that consumes the message (consumer server) reads the Take out the message and process the message. After processing a message, continu...

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): H04L12/58H04L29/08
CPCH04L51/18H04L67/141H04L67/146H04L67/10
Inventor 王杨
Owner BEIJING QIYI CENTURY SCI & TECH CO LTD
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