Unlock instant, AI-driven research and patent intelligence for your innovation.

Message consumption method and device, electronic equipment and computer storage medium

A message and target message technology, applied in the computer field, can solve problems such as abnormal business data, RocketMQ does not support idempotent consumption, etc.

Active Publication Date: 2022-01-07
FLYING FOX INFORMATION TECH TIANJIN CO LTD
View PDF5 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, for a business that consumes messages for counting, repeated messages will result in additional counts
[0003] However, RocketMQ itself does not support idempotent consumption. Therefore, when business consumes messages, repeated messages cause abnormalities in business data.

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0084] Optionally, in another embodiment of the present application, if the consumption is unsuccessful, an implementation of the message consumption method includes:

[0085] Store the idempotent identity of the target message, change the consumption status of the ID card of the target message to unsuccessful consumption, and enter the retry process.

[0086] In the specific implementation process of this application, the consumption status of unsuccessful consumption can be represented by but not limited to 2.

[0087] Specifically, the target message is sent to the retry queue. When the message enters the retry process, the idempotent consumption logic no longer takes effect, because in order to prevent consumers from losing messages, the retry message no longer follows the idempotent consumption process .

[0088] like image 3 As shown, it is a schematic diagram of the message consumption method provided by the embodiment of this application. The ①② process is the produ...

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 provides a message consumption method and apparatus, an electronic device and a computer storage medium. The message consumption method comprises the steps of obtaining a target message, wherein the target message comprises an idempotent identifier and an identity card; firstly, taking an idempotent identifier of a target message as a keyword, taking an identity card of the target message as a value, adding a consumption state of consumption to the identity card of the target message, and storing the information to a data structure server; then, within a preset time, judging whether the idempotent identifier of the target message exists in the data structure server or not; if it is judged that the idempotent identifier of the target message does not exist in the data structure server within preset time, determining that setting is successful, and entering a consumption process; and if the consumption is successful, storing the idempotent identifier of the target message, and changing the consumption state of the identity card of the target message into successful consumption. Therefore, duplicate removal can be realized, and idempotent consumption logic is realized.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular to a message consumption method, device, electronic equipment and computer storage medium. Background technique [0002] At present, when the business consumes messages, repeated messages cause abnormalities in the business data. At this time, the business needs to support idempotent logic. For example, for a business that consumes messages for counting, repeated messages will result in additional counts. [0003] However, RocketMQ itself does not support idempotent consumption. Therefore, when business consumes messages, repeated messages cause abnormalities in business data. Contents of the invention [0004] In view of this, the present application provides a message consumption method, device, electronic equipment, and computer storage medium, which can implement an idempotent scheme on a RocketMQ client, thereby improving message consumption efficiency. [0...

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): G06F9/54G06Q20/38G06Q20/40
CPCG06F9/546G06Q20/386G06Q20/4014G06F2209/547G06F2209/548
Inventor 高永飞赵永伟张益军王金明
Owner FLYING FOX INFORMATION TECH TIANJIN CO LTD