Reputation: 1739
Is it possible to create a priority queue using the Amazon simple queuing service?
Initially I couldn't find anything on the subject and this is why I create two queues. A general queue and a priority queue. I am enqueuing messages to this queue according the rule I've defined but confusion arises while dequeuing messages.
How do I do a long poll on the queues such that my combination of queues behave like a single priority queue?
Upvotes: 10
Views: 4687
Reputation: 6357
You could use Shoryuken and set a higher weight to configure the priority:
queues:
- [high_priority_queue, 5]
- [low_priority_queue, 1]
Upvotes: 1
Reputation: 3152
I think you're on the right track by creating two queues - A normal queue and a priority queue.
You don't necessarily need a long poll in this case. Since messages in the priority queue take precedence over messages in the normal queue, you could follow an approach like this:
Upvotes: 6