You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
In version 3.3.6, dynamically removing a consumer thread that is currently processing a message can result in message loss. This issue occurs because the consumer thread might be terminated before it completes processing the message, leading to the message not being acknowledged or reprocessed.
Code Analysis
When the WorkProcessor.halt method is called, if the run method is executing sequenceBarrier.waitFor(nextSequence), the consumer thread detects that it should stop. However, by this time, workSequence.compareAndSet(nextSequence - 1L, nextSequence) has already succeeded. This leads to the message being marked as processed even though the consumer thread is halted, resulting in the message being lost.
The text was updated successfully, but these errors were encountered:
Description
In version 3.3.6, dynamically removing a consumer thread that is currently processing a message can result in message loss. This issue occurs because the consumer thread might be terminated before it completes processing the message, leading to the message not being acknowledged or reprocessed.
Code Analysis
When the WorkProcessor.halt method is called, if the run method is executing sequenceBarrier.waitFor(nextSequence), the consumer thread detects that it should stop. However, by this time, workSequence.compareAndSet(nextSequence - 1L, nextSequence) has already succeeded. This leads to the message being marked as processed even though the consumer thread is halted, resulting in the message being lost.
The text was updated successfully, but these errors were encountered: