Commands with same priority are not handled in the correct order #2257
Labels
Priority 1: Must
Highest priority. A release cannot be made if this issue isn’t resolved.
Status: Resolved
Use to signal that work on this issue is done.
Type: Bug
Use to signal issues that describe a bug within the system.
Milestone
Basic information
Steps to reproduce
AxonServerCommandBus is using a PriorityBlockingQueue to queue commands to execute. When the priority of 2 items is the same,
this queue does not respect the order in which they are queued. A simple testcase for this:
With high volumes of commands, this could lead to starvation. An older command remains in the queue for a long time as the newer commands are picked up first.
Expected behaviour
When commands with the same priority are queued, I expect that the first command will be taken first.
Actual behaviour
Order in which they are taken is random.
The text was updated successfully, but these errors were encountered: