Problem
To handle tasks efficiently based on their priority, workloads need a mechanism to prioritize and execute tasks accordingly.
Workloads process tasks in the order they arrive, using a first-in, first-out (FIFO) queue structure.
Solution
Application sending a message to the queue assigns a priority to the message, and consumers process the messages by priority.
There are 2 approaches :
Single queue : All messages are sent to one queue and each message assigned a priority.
Multiple queue : Separate queues are used for each message priority.
Priority Queue In Practice