Message processing method and device and electronic equipment

A technology of message processing and electronic equipment, applied in the computer field, can solve problems such as system resource loss efficiency, network congestion, dependence, etc., and achieve the effect of reducing information interaction and avoiding repeated consumption

Active Publication Date: 2019-03-01
ALIBABA GRP HLDG LTD
View PDF11 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the process of the existing message consumer consuming the message, usually the message consumer first records the information of the consumer offset (Consumer Offset) of the message queue, and then sends the consumer offset information to the message server for further processing. Save (also called asynchronous save), in the process, if the message consumer encounters a sudden failure (for example, downtime, etc.) or the network is not smooth when sending the consumption site information to the message server, Some consumption site information may not be sent and saved to the message server in time, which may lead to repeated consumption of messages by other message consumers
In practical applications, the repeated consumption of messages is likely to cause situations such as repeated notifications corresponding to a certain message and repeated deductions for orders corresponding to a certain message, which not only affects user experience, but may also cause economic losses to users.
[0004] Although in the prior art there is also the use of setting up the database to avoid repeated consumption of messages by querying the database, etc., there is still a problem that the implementation process depends on the database, and frequent query operations will cause system resource loss and low efficiency. In addition, due to It is necessary to set up an additional database, which will also cause a more complex system structure, which will increase the cost of the system

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0093] Such as Figure 4 As shown, it is a schematic flow chart of the message processing method in Embodiment 1 of the present invention. Embodiment 1 can correspond to an application scenario, that is, a scenario where the consumer consumes messages in the message queue and broadcasts after forming consumption progress information. , the execution body of this method can be figure 2 the consumer in. Such as Figure 4 As shown, the method includes the following steps:

[0094] S410. Perform a consumption operation on the messages in the first message queue to be processed, and form consumption progress information of the first message queue.

[0095] During specific implementation, the consumer can obtain the allocated (that is, to-be-processed) message queue by pulling the message queue from the message server, which may be referred to as the first message queue in this embodiment. Of course, it is not limited to the above pulling method, for example, a method of pushin...

Embodiment 2

[0108] Such as Figure 5 As shown, it is a schematic flowchart of the message processing method in Embodiment 2 of the present invention, which may correspond to the application scenario in Embodiment 1. The method includes the following steps:

[0109] S510, monitor consumption progress information broadcast by other consumers in the network.

[0110] Wherein, the consumption progress information may be used to identify the consumption progress of the message in the consumed message queue. In specific implementation, each consumer can monitor the consumption progress information broadcast in the network at any time through the monitoring interface by setting a monitoring interface for monitoring at each consumer. In this embodiment, the message progress information can be Including information such as the ID of the message queue to which it belongs, and the topic of the message.

[0111] S520. Locally save the monitored consumption progress information of other consumers. ...

Embodiment 3

[0116] Such as Figure 6 As shown, it is a schematic flowchart of the message processing method in Embodiment 2 of the present invention. Embodiment 2 can correspond to an application scenario, that is, a scenario where the consumer consumes the message queue according to the search result of the locally stored consumption progress information. The execution body of this method can be image 3 the consumer in. Such as Figure 6 As shown, the method includes the following steps:

[0117] S610. Before performing a consumption operation on messages in the second message queue to be processed, search whether there is consumption progress information of the second message queue in locally stored consumption progress information. Wherein, the consumption progress information is obtained through broadcasts sent by other consumers in the network, and is used to identify the consumption progress of messages in the consumed message queue.

[0118] In this embodiment, consumers in th...

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 and electronic equipment. The message processing method comprises the following steps: performing consumption operationon messages in a to-be-processed first message queue, and forming consumption progress information of the first message queue; and broadcasting the consumption progress information in a network to enable other consumers in the network to locally save the consumption progress of the messages in the first message queue. The message processing method provided by the embodiment of the invention can enable the various consumers in the network to save the consumption progress information of other consumers, thereby effectively avoiding repeated consumption of the same message.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a message processing method and device and electronic equipment. Background technique [0002] Most of today's network service platforms (such as shopping, payment, etc.) use a distributed message system (such as Kafka, a high-throughput distributed publish-subscribe message system) as the basic message facility of the platform to support the platform The development of many online businesses in China and the processing of hundreds of millions of messages. In an existing distributed message system, it usually includes a message producer (Producer) responsible for generating messages and sending them to the message server, a message server (Broker) responsible for organizing and coordinating messages, and a message server (Broker) responsible for receiving messages from the message server. The message consumer (Consumer) that consumes the message. [0003] In the proce...

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): H04L12/18G06Q30/06
CPCG06Q30/0601H04L12/1804H04L47/50
Inventor 刘振东王小瑞冯嘉
Owner ALIBABA GRP HLDG LTD
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