-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Merged
Merged
Documentation #250
Changes from 25 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
745b353
Start docs refining
viktorprogger eb27a90
Apply fixes from StyleCI
StyleCIBot ac1a2f8
Apply suggestions from code review
viktorprogger 1fb3057
Update docs/guide/en/message-handler.md
viktorprogger 91bb7cf
Add links to mentioned packages
viktorprogger 2feaf14
Continue writing docs
viktorprogger 604f2c0
Document Yii Debug integration
viktorprogger aee4f72
Fix queue:listen-all command name
viktorprogger 7821be0
Prerequisites and installation in the guide
viktorprogger 4fe7321
Middleware pipelines in the guide
viktorprogger 23e7997
Add comprehensive documentation for callable definitions and update r…
viktorprogger ae5867a
Improve the channels.md guide
viktorprogger f2e7eff
Remove redundant info from the main readme
viktorprogger c598caf
Guide improvements and bugfixes
viktorprogger 0f05e07
Merge two different failure handling guides
viktorprogger dd3ae30
Apply Rector changes (CI)
viktorprogger dd30d79
Rewrite channels doc
viktorprogger a86b307
Improve channel docs and fix PR comments
viktorprogger 19c4c44
Fix docs due to PR comments
viktorprogger 011db93
Merge branch 'master' into docs
viktorprogger a189beb
Apply PHP CS Fixer and Rector changes (CI)
viktorprogger a675bdc
Remove the old queue:listen:all command alias
viktorprogger da4a7a6
Rename `maximum` console command parameter to the more common `limit`
viktorprogger bb9bea8
Rename channels to queue names and generally improve docs
viktorprogger 108efce
Docs enhancements
viktorprogger de9d798
Merge master into docs, resolving conflicts
viktorprogger 1bc4cbe
Update docs to reflect master branch changes
viktorprogger 4a19dcc
Docs clarafication
viktorprogger 09b7174
Docs clarification
viktorprogger e4e4468
Docs clarification
viktorprogger 4c673c9
Docs clarification
viktorprogger e79b627
Fix exception message
viktorprogger 6620bf9
Fix test
viktorprogger cb28c32
Fix MiddlewareFactoryPush construction in docs
viktorprogger f4dd5e2
Fix docs heading
viktorprogger 2b7bbaa
Fix console command list in readme
viktorprogger 325909a
Fix error handling naming in docs
viktorprogger 1b72d20
Middleware factory bugfix
viktorprogger 3e284f2
Apply PHP CS Fixer and Rector changes (CI)
viktorprogger f0e0cef
Fix internal link
viktorprogger 7862a5d
Merge remote-tracking branch 'origin/docs' into docs
viktorprogger b9b029c
Rename message.handlerName to message.type
viktorprogger 5869dda
Review fixes
viktorprogger 3afb9aa
Fix DB performance tuning suggestion
viktorprogger eba006b
Merge master into docs - resolve conflicts
viktorprogger f284cf2
Fix bug after merge
viktorprogger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,36 @@ | ||
| # Yii Queue | ||
| # Yii Queue documentation map | ||
|
viktorprogger marked this conversation as resolved.
Outdated
|
||
|
|
||
| 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) | ||
|
viktorprogger marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
viktorprogger marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## 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. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.