Dual FIFO Queue Retry Handling for Messaging Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current message queueing services face inefficiencies and processing slowdowns due to failed message processing, leading to unnecessary overhead and resource utilization issues in distributed computing environments.
Innovation Solution
Implementing a retry handling mechanism using two FIFO queues - a primary queue for message processing and a retry queue for failed messages, where acknowledgments are sent regardless of processing success or failure, allowing the system to continue message processing without interruption and enabling reprocessing after a threshold time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If message processing fails in a traditional queue system, then the system must stop and retry processing, but this causes processing slowdowns and reduces productivity
Solution Approach 1:
The patent divides the single message queue into two separate queues: a primary queue for new messages and a retry queue for failed messages. This segmentation allows the system to handle failed messages separately without blocking the processing of new messages, thus maintaining productivity while ensuring reliable retry handling.
Solution Approach 2:
The retry queue acts as an intermediary between the primary queue and the message processing system. Failed messages are moved to the retry queue, which then periodically redelivers them for reprocessing. This intermediary mechanism isolates retry logic from the main processing flow, preventing processing slowdowns while maintaining reliability.
2Reliability
If the system continuously retries failed messages in the same queue, then message processing reliability improves, but memory usage increases due to message accumulation
Solution Approach 1:
By segmenting the queue into primary and retry queues, the patent prevents failed messages from accumulating in the primary queue. The retry queue serves as a dedicated buffer for failed messages, isolating them from the main message flow and preventing memory usage in the primary queue from increasing due to message accumulation.
Solution Approach 2:
The system implements periodic redelivery of failed messages from the retry queue rather than continuous immediate retries. This periodic action allows the system to manage retry attempts in a controlled manner, preventing unlimited message accumulation in memory while still ensuring reliable delivery through repeated retry cycles.
3Measurement precision
If the system sends acknowledgments only on successful processing, then processing accuracy improves, but the system cannot continue processing without interruption when failures occur
Solution Approach 1:
The patent segments the acknowledgment flow into two paths: successful messages receive acknowledgments and are removed from the primary queue, while failed messages are moved to the retry queue and also receive acknowledgments to allow the consumer to continue processing. This segmentation enables continuous processing while maintaining precise tracking of processing outcomes.
Solution Approach 2:
The retry queue serves as an intermediary that captures failed messages while allowing the message consumer to continue processing successful messages. By moving failed messages to the retry queue and sending acknowledgments, the system maintains continuous processing capability while preserving accurate information about which messages succeeded and which failed through the intermediary retry mechanism.
Data Source
AI summary
In one embodiment, a computer-implemented method comprises receiving a plurality of digital data messages in a first-in first-out (FIFO) primary queue of an electronic digital memory that is coupled to a message consuming process that is executed using computer instructions that are programmed to serially obtain messages from the primary queue and to process the messages; determining that processing a first message of the plurality of messages has failed; in response to determining that processing the first message failed, using the message consuming process, sending a first acknowledgement to the primary queue, sending the first message to a retry queue that is different from the primary queue, and processing one or more other messages from the primary queue; obtaining the first message from the retry queue; reprocessing the first message; repeating periodically selecting and processing one or more other messages from the primary queue and periodically selecting and processing one or more different other messages from the retry queue.


