is there any way to stop consumers from eating low priority messages until all high priority messages are consumed?
I am thinking of checking the queue state in low priority message handler, but this solution doesn't seem elegant and can be danger.
Maybe too late, but we found a way that works reasonably well for our needs.
Basically, the high priority job writes a lock in DB. Then, when the low priority job starts, it first checks the lock: if it is there, we reschedule the job with a delay stamp.
The lock is removed as part of the high priority job, as a last step. Then, when the low priority job arrives again, it can be processed. By doing this we are able to manage three queues with different priority levels. However, we gained in complexity in our flows.