Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
745b353
Start docs refining
viktorprogger Dec 13, 2025
eb27a90
Apply fixes from StyleCI
StyleCIBot Dec 13, 2025
ac1a2f8
Apply suggestions from code review
viktorprogger Dec 18, 2025
1fb3057
Update docs/guide/en/message-handler.md
viktorprogger Dec 18, 2025
91bb7cf
Add links to mentioned packages
viktorprogger Dec 18, 2025
2feaf14
Continue writing docs
viktorprogger Dec 21, 2025
604f2c0
Document Yii Debug integration
viktorprogger Dec 21, 2025
aee4f72
Fix queue:listen-all command name
viktorprogger Jan 5, 2026
7821be0
Prerequisites and installation in the guide
viktorprogger Jan 5, 2026
4fe7321
Middleware pipelines in the guide
viktorprogger Jan 5, 2026
23e7997
Add comprehensive documentation for callable definitions and update r…
viktorprogger Jan 7, 2026
ae5867a
Improve the channels.md guide
viktorprogger Jan 7, 2026
f2e7eff
Remove redundant info from the main readme
viktorprogger Jan 7, 2026
c598caf
Guide improvements and bugfixes
viktorprogger Jan 7, 2026
0f05e07
Merge two different failure handling guides
viktorprogger Jan 7, 2026
dd3ae30
Apply Rector changes (CI)
viktorprogger Jan 7, 2026
dd30d79
Rewrite channels doc
viktorprogger Jan 18, 2026
a86b307
Improve channel docs and fix PR comments
viktorprogger Jan 24, 2026
19c4c44
Fix docs due to PR comments
viktorprogger Jan 24, 2026
011db93
Merge branch 'master' into docs
viktorprogger Feb 21, 2026
a189beb
Apply PHP CS Fixer and Rector changes (CI)
viktorprogger Feb 21, 2026
a675bdc
Remove the old queue:listen:all command alias
viktorprogger Feb 21, 2026
da4a7a6
Rename `maximum` console command parameter to the more common `limit`
viktorprogger Feb 21, 2026
bb9bea8
Rename channels to queue names and generally improve docs
viktorprogger Feb 21, 2026
108efce
Docs enhancements
viktorprogger Apr 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
305 changes: 61 additions & 244 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'commands' => [
'queue:run' => RunCommand::class,
'queue:listen' => ListenCommand::class,
'queue:listen:all' => ListenAllCommand::class,
'queue:listen-all' => ListenAllCommand::class,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was alright. The console works the best when the separator is :.

],
],
'yiisoft/queue' => [
Expand Down
37 changes: 31 additions & 6 deletions docs/guide/en/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
# Yii Queue
# Yii Queue documentation map

An extension for running tasks asynchronously via queues.
## Install and configure

## Guides and concept explanations
- [Prerequisites and installation](prerequisites-and-installation.md)
- [Configuration with yiisoft/config](configuration-with-config.md)
- [Adapter list](adapter-list.md)
- [Synchronous adapter](adapter-sync.md)
- [Queue names](queue-names.md)

## Build and run jobs

- [Usage basics](usage.md)
- [Migrating from `yii2-queue`](migrating-from-yii2-queue.md)
- [Messages and handlers: concepts](messages-and-handlers.md)
- [Message handler](message-handler-simple.md)
- [Console commands](console-commands.md)
- [Job status](job-status.md)

## Reliability and visibility

- [Errors and retryable jobs](error-handling.md)
- [Workers](worker.md)
- [Adapter list](adapter-list.md)
- [Envelopes](envelopes.md)
- [Yii Debug integration](debug-integration.md)

## Production readiness

- [Best practices](best-practices.md)
- [Running workers in production (systemd and Supervisor)](process-managers.md)

## Migration

- [Migrating from `yii2-queue`](migrating-from-yii2-queue.md)

## Advanced topics

Open the [advanced documentation map](advanced-map.md) if you build custom middleware, adapters, queue providers, or tooling.
49 changes: 49 additions & 0 deletions docs/guide/en/advanced-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Advanced documentation map

Use this index when you need to customize internals: custom middleware, adapters, queue providers, tooling, or diagnostics.

## Configuration and infrastructure

- [Manual configuration without yiisoft/config](configuration-manual.md) — wiring queues, workers, and middleware factories without `yiisoft/config`.
- [Queue provider registry](#queue-provider-registry) — selecting and extending adapter factories.
- [Loops and worker processes](loops.md) — implementing custom runners, heartbeat hooks, and graceful shutdown (requires `pcntl`).
- [Worker internals](worker.md) — dependency resolution and middleware stacks within `WorkerInterface`.
- [Performance tuning](performance-tuning.md) — profiling handlers, envelopes, and adapters.

## Middleware, envelopes, and handlers

- [Middleware pipelines deep dive](middleware-pipelines.md) — dispatcher lifecycle, request mutations, and per-pipeline contracts.
- [Callable definitions and middleware factories](callable-definitions-extended.md) — container-aware definitions for middleware factories.
- [Error handling](error-handling.md#failure-pipeline-overview) — end-to-end flow of the failure pipeline.
- [Custom failure middleware](error-handling.md#how-to-create-a-custom-failure-middleware) — implementing `MiddlewareFailureInterface`.
- [Envelope metadata and stack reconstruction](envelopes.md#metadata-and-envelope-stacking) — stack resolution and metadata merging.
- [FailureEnvelope usage](error-handling.md#failureenvelope) — retry metadata semantics.
- [Handler resolver pipeline](message-handler.md#resolver-pipeline) — alternative handler lookup strategies.

## Queue adapters and interoperability

- [Custom queue provider implementations](queue-names-advanced.md#extending-the-registry) — bespoke selection logic, tenant registries, and fallback strategies.
- [Consuming messages from external systems](consuming-messages-from-external-systems.md) — contract for third-party producers.
- [Adapter internals](adapter-list.md#available-adapters) — extend or swap backend adapters.

## Tooling, diagnostics, and storage

- [Yii Debug collector internals](debug-integration-advanced.md) — collector internals, proxies, and manual wiring.
- [Job status storage extensions](job-status.md#extend-storage) — persisting custom metadata or drivers.
- [Extending queue processes and supervisors](process-managers.md#custom-supervisors) — custom supervisor hooks and graceful shutdown integration.
Comment on lines +15 to +33
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several anchors referenced here don’t exist in the target docs, so these links are currently broken on GitHub: error-handling.md#failure-pipeline-overview (heading is different), message-handler.md#resolver-pipeline, job-status.md#extend-storage, and process-managers.md#custom-supervisors. Please update the anchors (or add the missing sections) so the documentation map is navigable.

Copilot uses AI. Check for mistakes.

## Internals and contribution

- [Internals guide](../../internals.md) — local QA tooling (PHPUnit, Infection, Psalm, Rector, ComposerRequireChecker).

## Queue provider registry

When multiple queue names share infrastructure, rely on `QueueProviderInterface`:

- A queue name is passed to `QueueProviderInterface::get($queueName)` and resolved into a configured `QueueInterface` instance.
- Providers typically construct adapters lazily via [`yiisoft/factory`](https://github.com/yiisoft/factory) and call `AdapterInterface::withChannel($channel)` to switch broker-specific channels.
- Default implementation (`AdapterFactoryQueueProvider`) enforces a strict registry defined in `yiisoft/queue.channels`. Unknown names throw `ChannelNotFoundException`.
- Alternative providers include:
- `PrototypeQueueProvider` — clones a base queue/adapter, switching only the channel name (useful when all queues share infrastructure but risks typos).
- `CompositeQueueProvider` — aggregates multiple providers and selects the first that knows the queue name.
- Implement `QueueProviderInterface` to introduce custom registries or fallback strategies, then register the implementation in DI.
Loading
Loading