10 ms·
> de-queing, checking a stored timestamp then re-enqueing if the time hasn't passed yet That sounds reasonable to me. Any condition that means you can't proces
by quickthrower2 7y ago
> de-queing, checking a stored timestamp then re-enqueing if the time hasn't passed yet
That sounds reasonable to me. Any condition that means you can't process that yet, just re-queue it for later. Let the Queue be a dumb single purpose component and do what it does best.
If you are upset about making the business logic more complicated: The thing that does this check could be middleware so that your application code can not be concerned with it.
For the philosophy see: http://harmful.cat-v.org/cat-v/ http://harmful.cat-v.org/cat-v/
> "cat isn't for printing files with line
numbers, it isn't for compressing multiple blank lines, it's not for looking at
non-printing ASCII characters, it's for concatenating files."
So you could argue "queue isn't for scheduling messages, it isn't for X.. Y.. Z.., it's for managing a queue of things"