- 🇬🇧United Kingdom catch
I think mutable queue items is going a bit too far away from what queue implementations do in general.
Delayed (re-)queuing is something we already support in the API though, this would be just allowing that to be specified when creating the item.
Changing the issue title, but we'll also need an issue summary update and patch if we go that way.
@BR0kEN do you have any use cases that aren't delayed requeueing that you intended to use this for?
- 🇬🇧United Kingdom james.williams
I think delayed requeuing works for my needs, but only as long as the number of retries can be tracked. If that's stored as a property on the items, isn't that just the same as making the items mutable anyway, which could still be useful on its own? (Especially as that's how in-memory queue items already behave.)
- 🇦🇺Australia dpi Perth, Australia
but only as long as the number of retries can be tracked.
I think you'd want to use one of the
keyvalue*
services for this.I think mutable queue items is going a bit too far away from what queue implementations do in general.
It does sound a lot like Symfony Envelope Stamps though. However we don't implement anything like it in Drupal. I'd like to see it personally.
» Add support for pre-delayed queue items
Which is basically \Symfony\Component\Messenger\Stamp\DelayStamp. In the case of database backed messages, is a simple timestamp column on the message table indicating minimum time to execute the message.