Skip to content

[RFC][Messenger] Redis Delay Implementation #31711

Closed
@ragboyjr

Description

@ragboyjr

Description

Currently, the Messenger Redis Implementation doesn't support the delay property of the DelayStamp. It's a bit tricky because redis streams doesn't support the delay natively.

I think we could probably implement something similar to Laravel where they basically put jobs with a delay into a sorted set sorted by the timestamp and when the consumer runs to pull a job, we first check the sorted set for jobs that are now available by the current timestamp, and if so, then we insert them into the queue.

Example

https://github.com/laravel/framework/blob/5.8/src/Illuminate/Queue/LuaScripts.php#L109
https://github.com/laravel/framework/blob/5.8/src/Illuminate/Queue/RedisQueue.php#L134

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureMessengerRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions