Imagine a queue system with different consumers - some are low cost whist (like 'reserved/spot' instances in the AWS world) others would be high cost.
The system should ensure the messages are processed by the low cost consumers when available, but if they are unable to process a message after a certain time period then they should be processed by the high cost consumers.
I imagine this could be done by something like
- A queue that moved messages onto another queue if they haven't been processed by X time.
- A delay queue where the delay can be overridden on 'get'. (So the low cost consumer asks for messages without a delay, whilst the high cost consumer will only see messages once delay passed).
What am I looking for?
ack
signal back to the broker (so if you pick up a message and sendnack
then it's available for another worker). SQS also has a similar acknowledgement mechanism.