-
-
Notifications
You must be signed in to change notification settings - Fork 27
Documentation #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Documentation #250
Changes from all commits
745b353
eb27a90
ac1a2f8
1fb3057
91bb7cf
2feaf14
604f2c0
aee4f72
7821be0
4fe7321
23e7997
ae5867a
f2e7eff
c598caf
0f05e07
dd3ae30
dd30d79
a86b307
19c4c44
011db93
a189beb
a675bdc
da4a7a6
bb9bea8
108efce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| 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. |
| 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
|
||
|
|
||
| ## 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. | ||
There was a problem hiding this comment.
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
:.