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

Message processing method and device

A message processing and message technology, applied in the computer field, can solve the problems of late reading and processing of the latest data, wasting bandwidth, occupying local storage, etc.

Pending Publication Date: 2020-01-07
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF4 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] (1) Poor real-time performance of message processing
In the case of a large backlog of data on the server, the message consumer still reads the messages in the corresponding partition sequentially, which will cause slow data reading or network congestion, so that the latest data will be read and processed with a delay, and the message consumer will run Busy, reduced processing power
[0006] (2) If the message volume is large, the number of unprocessed messages will be large, which will occupy a large amount of local storage
[0007] (3) Deployment and maintenance costs are high, and multiple machines process messages repeatedly, wasting bandwidth

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
  • Message processing method and device
  • Message processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention 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 invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0038] figure 1 is a schematic diagram of main steps of a message processing method according to an embodiment of the present invention. Such as figure 1 As shown, the message processing method in the embodiment of the present invention mainly includes the following steps:

[0039]Step S101: Obtain the location information of unread messages in the partition according t...

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 processing method and device, and relates to the technical field of computers. One specific embodiment of the method comprises the following steps: acquiring positioninformation of an unread message in a partition according to a message theme and the partition subscribed by a message user, and storing the position information of the unread message in a cache; counting the number of the unread messages, and allocating threads corresponding to the number of the unread messages, the threads being used for acquiring the unread messages; and obtaining an unread message in the partition and corresponding to the position information in the cache through the thread, so as to carry out service processing on the obtained message. According to the method, the position information of the unread message is cached, the unread message corresponding to the position information in the cache is acquired through the threads, and then service processing is performed on the unread message, so that the unread message can be acquired according to the specified position information in the cache, and the message processing real-time performance is improved.

Description

technical field [0001] The invention relates to the computer field, in particular to a message processing method and device. Background technique [0002] Kafka is a high-throughput distributed message publish-subscribe system. The existing Kafka-based message processing system includes a Kafka cluster composed of one or more message producers (producers, also referred to as producers in this article), and one or more servers (Kafka instances, also referred to as Brokers) As well as the message consumer (consumer, also referred to as the consumer in this article), the message generator and the message consumer are usually called the client, and the Kafka cluster is called the server. The message generator is responsible for generating and publishing messages to Broker, and the message consumer is responsible for reading messages from Broker and executing corresponding business logic processing. Each message published to the Kafka cluster has a category, which is called a t...

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/50H04L29/08
CPCG06F9/505H04L67/1095H04L67/568
Inventor 马德友
Owner BEIJING JINGDONG SHANGKE INFORMATION 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