|
| 1 | +# Advanced documentation map |
| 2 | + |
| 3 | +Use this index when you need to customize internals: custom middleware, adapters, queue providers, tooling, or diagnostics. |
| 4 | + |
| 5 | +## Configuration and infrastructure |
| 6 | + |
| 7 | +- [Manual configuration without yiisoft/config](configuration-manual.md) — wiring queues, workers, and middleware factories without `yiisoft/config`. |
| 8 | +- [Queue provider registry](#queue-provider-registry) — selecting and extending adapter factories. |
| 9 | +- [Loops and worker processes](loops.md) — implementing custom runners, heartbeat hooks, and graceful shutdown (requires `pcntl`). |
| 10 | +- [Worker internals](worker.md) — dependency resolution and middleware stacks within `WorkerInterface`. |
| 11 | +- [Performance tuning](performance-tuning.md) — profiling handlers, envelopes, and adapters. |
| 12 | + |
| 13 | +## Middleware, envelopes, and handlers |
| 14 | + |
| 15 | +- [Middleware pipelines deep dive](middleware-pipelines.md) — dispatcher lifecycle, request mutations, and per-pipeline contracts. |
| 16 | +- [Callable definitions and middleware factories](callable-definitions-extended.md) — container-aware definitions for middleware factories. |
| 17 | +- [Error handling](error-handling.md#failure-pipeline-overview) — end-to-end flow of the failure pipeline. |
| 18 | +- [Custom failure middleware](error-handling.md#how-to-create-a-custom-failure-middleware) — implementing `MiddlewareFailureInterface`. |
| 19 | +- [Envelope metadata and stack reconstruction](envelopes.md#metadata-and-envelope-stacking) — stack resolution and metadata merging. |
| 20 | +- [FailureEnvelope usage](error-handling.md#failureenvelope) — retry metadata semantics. |
| 21 | +- [Handler resolver pipeline](message-handler.md#resolver-pipeline) — alternative handler lookup strategies. |
| 22 | + |
| 23 | +## Queue adapters and interoperability |
| 24 | + |
| 25 | +- [Custom queue provider implementations](queue-names-advanced.md#extending-the-registry) — bespoke selection logic, tenant registries, and fallback strategies. |
| 26 | +- [Consuming messages from external systems](consuming-messages-from-external-systems.md) — contract for third-party producers. |
| 27 | +- [Adapter internals](adapter-list.md#available-adapters) — extend or swap backend adapters. |
| 28 | + |
| 29 | +## Tooling, diagnostics, and storage |
| 30 | + |
| 31 | +- [Yii Debug collector internals](debug-integration-advanced.md) — collector internals, proxies, and manual wiring. |
| 32 | +- [Job status storage extensions](job-status.md#extend-storage) — persisting custom metadata or drivers. |
| 33 | +- [Extending queue processes and supervisors](process-managers.md#custom-supervisors) — custom supervisor hooks and graceful shutdown integration. |
| 34 | + |
| 35 | +## Internals and contribution |
| 36 | + |
| 37 | +- [Internals guide](../../internals.md) — local QA tooling (PHPUnit, Infection, Psalm, Rector, ComposerRequireChecker). |
| 38 | + |
| 39 | +## Queue provider registry |
| 40 | + |
| 41 | +When multiple queue names share infrastructure, rely on `QueueProviderInterface`: |
| 42 | + |
| 43 | +- A queue name is passed to `QueueProviderInterface::get($queueName)` and resolved into a configured `QueueInterface` instance. |
| 44 | +- Providers typically construct adapters lazily via [`yiisoft/factory`](https://github.com/yiisoft/factory) and call `AdapterInterface::withChannel($channel)` to switch broker-specific channels. |
| 45 | +- Default implementation (`AdapterFactoryQueueProvider`) enforces a strict registry defined in `yiisoft/queue.channels`. Unknown names throw `ChannelNotFoundException`. |
| 46 | +- Alternative providers include: |
| 47 | + - `PrototypeQueueProvider` — clones a base queue/adapter, switching only the channel name (useful when all queues share infrastructure but risks typos). |
| 48 | + - `CompositeQueueProvider` — aggregates multiple providers and selects the first that knows the queue name. |
| 49 | +- Implement `QueueProviderInterface` to introduce custom registries or fallback strategies, then register the implementation in DI. |
0 commit comments