Message queue processing method, medium, equipment and system
A message queue and processing method technology, applied in the message queue processing method, equipment and system, and media fields, can solve the problems of insufficient throughput capacity and not strictly guaranteeing the order of messages, so as to avoid data loss, achieve reliability, and ensure timing Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0121] In the financial system's consistency requirements for account systems, it is required that when the previous transaction of the same account is not completed, the subsequent transaction cannot be processed, that is, strict timing is required. When performing asynchronous processing, it is necessary to use message queues for inter-system communication, and strictly guarantee the timing of messages from the same account. At the same time, when performing batch processing, the message queue is required to reach a message throughput capacity of 10,000 levels per second, and to have a message accumulation capacity of more than one million levels.
[0122] The light-weight deployed message queue in the embodiment of the present invention can be applied to the accounting micro-service system, and has the following capabilities: it can support the processing / accumulation capability of more than one million messages within one hour; it supports the specified business associated ...
Embodiment 2
[0155] Figure 2A It is a flow chart of a message queue processing method according to an embodiment of the present invention. Such as Figure 2A As shown, the method is applied to a message queue device, for example including but not limited to a Redis message queue, which includes the following steps:
[0156] S101. Obtain the write segment index value according to the partition name sent by the message producer;
[0157] In this embodiment, a segment is a collection of message contents stored under a storage key, and is a Stream data structure. It is stored in the same Redis in the storage queue as a Hash data structure. After specifying the Hash key name and the partition name as the field name, the write index of the partition can be accessed. The corresponding Redis operation instructions are:
[0158] hget streamreaderWriteIdx partition name.
[0159] In addition, there is a read index (streamreaderReadIdx) corresponding to the write index, which is also stored in ...
Embodiment 3
[0330] The embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it realizes:
[0331] Obtain the value of the write segment index according to the partition name sent by the message producer;
[0332] Obtain the segment number from querying the Hash of the segment index according to the partition name, and use the partition name and the segment number to concatenate to obtain the storage key name;
[0333] Write the message content according to the storage key name, and determine the message time sequence number entryId corresponding to the message content;
[0334] Write a mark in the preset data structure of the message queue, the mark is used to indicate that the message content has not been synchronized between the master node and the slave node of the message queue; Whether the number reaches the preset length of the...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com