A rabbitmq-based asynchronous message retry method, system and system construction method
An asynchronous message and construction method technology, applied in transmission systems, electrical components, etc., can solve the problems of reducing the processing capacity of the consumer, waste of resources, etc., and achieve the effect of balancing integrity and system overhead, reliable consumption, and ensuring efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0043] A method for building a message retry system based on RabbitMQ, comprising the following steps:
[0044] 1. Create an exchange (exchange):
[0045] Work exchange (main exchange): the main exchange, which is published to this exchange when publishing a message, and multiple are created according to business needs.
[0046] retry exchange (retry exchange): retry the exchange, when the message processing is abnormal (within the maximum number of retries), re-deliver the message to the exchange, and create a virtual host (virtual host).
[0047] Fail exchange (failed exchange): Failed exchange, after exceeding the maximum number of retries, the message is delivered to the exchange, in order to maintain business isolation, it is consistent with the work exchange.
[0048] All exchange declarations take the following parameters:
[0049]
[0050] 2. Create a queue:
[0051] work queue: the main queue, which stores published messages. The declaration parameters are as f...
Embodiment 2
[0062] This embodiment discloses a message retry system based on Rabbit tMQ, which is constructed by the construction method of the message retry system based on Rabbit tMQ in the above embodiment.
Embodiment 3
[0064] Such as figure 1 As shown, this embodiment discloses an asynchronous message retry method based on the RabbitMQ-based message retry system of the above-mentioned embodiment, which includes the following steps:
[0065] 1. The producer publishes a message to the work exchange.
[0066] 2. The work exchange distributes the message to the corresponding message queue according to the routing-key.
[0067] 3. Multiple consumers actually consume messages in the main queue at the same time. Therefore, they adopt a "competition" method to strive for news consumption.
[0068] 4. After the message is consumed, regardless of success or failure, the consumer must return an ACK consumption confirmation to the queue to avoid repeated message delivery. At the same time, if the processing is successful, the process ends, otherwise it enters the retry phase.
[0069] 5. Obtain the number of retries x-retry-count from the header (header file) of the message (if the parameter is not ...
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