Consumption method and device of message queue
A message queue and message technology, applied in the field of communication, can solve the problems of reducing consumption efficiency, repeated data consumption, consumption errors, etc., and achieve the effect of improving consumption efficiency and avoiding repeated data consumption
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0028] figure 1 It shows a schematic flowchart of a message queue consumption method provided by Embodiment 1 of the present invention, and the method includes:
[0029] Step S110: When the consumption task starts, establish a communication connection with the background database.
[0030] Wherein, the consumption task refers to the task of reading and processing the message queue at the consumer end. Among them, one message queue may correspond to one or more consumption tasks, and one consumption task may also correspond to one or more message queues. When a consumption task is started, the consumption end executing the consumption task establishes a communication connection with the background database. The communication connection can be established in various ways, which is not limited in the present invention. Wherein, the start of the consumption task includes various situations such as starting the consumption task for the first time and restarting the consumption ta...
Embodiment 2
[0039] figure 2 It shows a schematic flowchart of a message queue consumption method provided by Embodiment 2 of the present invention, as shown in figure 2 As shown, the method includes:
[0040] Step S210: When the consumption task starts, establish a communication connection with the background database.
[0041] Wherein, the consumption task refers to the task of reading and processing the message queue at the consumer end. Among them, one message queue may correspond to one or more consumption tasks, and one consumption task may also correspond to one or more message queues. When a consumption task is started, the consumption end executing the consumption task establishes a communication connection with the background database. The communication connection can be established in various ways, which is not limited in the present invention. Wherein, the start of the consumption task includes various situations such as starting the consumption task for the first time and...
Embodiment 3
[0062] image 3 A schematic structural diagram of a message queue consumption device provided by Embodiment 3 of the present invention is shown, as shown in image 3 As shown, the device includes:
[0063] The establishment module 31 is adapted to establish a communication connection with the background database when the consumption task is started;
[0064] The obtaining module 32 is adapted to obtain the current offset information of the message queue corresponding to the consumption task from the background database through the communication connection;
[0065] The reading module 33 is adapted to read the message data in the message queue according to the acquired current offset information when the acquisition is successful;
[0066] The update module 34 is adapted to update the current offset information of the message queue in the background database according to the offset address corresponding to the message data each time a piece of message data is read from the me...
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