yiisoft / yiisoft/queue

Adapter delay support flag

Open
#305 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
61
Forks
31
Avg merge
1d 7h
Merged PRs (30d)
9

Description

Proposed new feature or change

ExponentialDelayMiddleware computes the backoff and pushes a DelayEnvelope, but the actual delaying is on the adapter (its docblock says so). Problem: no way to know whether an adapter honors it. Redis and the in-memory adapter just ignore DelayEnvelope, so the message comes back right away - no backoff, just instant retries. AMQP delays fine.

Same story as status() before #272. #191 listed both delay and status as adapter features; #272 did the status half, delay's still open.

Proposal: add hasDelaySupport(): bool, like hasStatusSupport(). Then the middleware can fall back / warn instead of silently dropping the delay.

Ok to go the same route as #272? Happy to PR it - core + redis/amqp.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ExponentialDelayMiddleware, DelayEnvelope, and the hasStatusSupport() implementation from #272. Check how the Redis, in-memory, and AMQP adapters handle DelayEnvelope, then trace where middleware can use the proposed capability flag. Done means adapters report delay support consistently and unsupported delays no longer fail silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, rabbitmq, redis
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.