How does the priority work when processing a queue that includes retries

I have a queue that has transactions where I want all to be completed, but I want to complete one subset of items first. My plan was to just give high priority to the first completed, then low priority to the ones I want done second.

However, if a transaction fails for an application exception (happens semi-frequently due to the applications I’m working with), I want it to be retried X times. When a high priority item fails and is retried, is it retried before or after the low priority items that haven’t yet been processed at all?

So if I have 5 items in the queue, 3 of which are high priority (HP) and 2 low priority (LP) would the processing go as follows?

  1. HP1 - processed
  2. HP2 - fails
  3. HP3 - processed
  4. HP2 retry - processed
  5. LP1 - processed
  6. LP2 - processed

To the extent I worked with queues, I believe that is the correct order.
When a transaction item in a queue fails, it is then retried as a new transaction item which will go to the end of transaction item list.
For ex: If you have 10 HP’s and if 5th HP fails, then a new transaction is created at 11th place for 5th HP. So, it is still a new transaction with “HP” which should be processed before LP’s.

Therefore, the order should be correct.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.