Skip to content

Add subqueuettl driver integration test - #28

Closed
Col-Waltz wants to merge 2 commits into
tarantool-php:masterfrom
Col-Waltz:add-subqueuettl-driver-integration-test
Closed

Col-Waltz wants to merge 2 commits into
tarantool-php:masterfrom
Col-Waltz:add-subqueuettl-driver-integration-test

Conversation

@Col-Waltz

@Col-Waltz Col-Waltz commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Adds subqueuettl driver to the tests: tarantool/queue@8b3c7c3. This driver contains
named subqueues stored in one space. It requires a subqueue
name for put() and take(), so consumers can take tasks from
a specific subqueue. Supports TTL, TTR, priority, and delay.
In order to support this driver php functions have to support
a subqueue name as an optional argument, also tests have to be
updated providing this names.

In latest queue update new subqueuettl driver was added. This
driver needs per-subqueue statistics and adds a new `stats.extra`
field for it. This addition also allows each driver to report
meaningful operational metrics without extending the generic
statistics implementation for every driver-specific use case.
Adds subqueuettl driver to the tests. This driver contains
named subqueues stored in one space. It requires a subqueue
name for put() and take(), so consumers can take tasks from
a specific subqueue. Supports TTL, TTR, priority, and delay.
In order to support this driver php functions have to support
a subqueue name as an optional argument, also tests have to be
updated providing this names.
@rybakit

rybakit commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Hi @Col-Waltz, thank you for the PR! Could you please rebase it against master? I had to resurrect the disabled CI, fix a few CI issues, and drop old PHP versions.

@rybakit

rybakit commented Oct 23, 2026

Copy link
Copy Markdown
Member

After thinking about this more, I'm concerned that passing subqueue options to every method may make the API awkward. A subqueue handle could be a better DX:

$subqueue = $queue->subqueue('emails');

$task = $subqueue->put($data);
$task = $subqueue->take(timeout: 2.0);

$subqueue->ack($task->getId());

This also makes me wonder how we want to expose driver-specific behavior generally, as in #22. I'm not sure yet what the right API is, though.

@rybakit

rybakit commented Oct 23, 2026

Copy link
Copy Markdown
Member

Superseded by #30.

@rybakit rybakit closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants