Documentation

Overview content is shown below. Use the menu to open other pages.

Queues & Horizon

Queues

  • Redis-backed queues are configured in `config/queue.php`.
  • IEC uses a priority resolver (`App\Services\QueueResolver`) to map a numeric priority to queue names, via `config/queue-map.php`:
  • - `integrations-immediate` (<= 50)

    - `integrations-normal` (<= 200)

    - `integrations-low` (<= 250)

    - Fallback → `integrations-low`

Prioritization

  • Each `Integration` defines a `priority_map` where keys are attribute codes and the value is priority (lower is higher priority). A wildcard `*` acts as default.
  • `EntityObserver` computes changed fields per mutation and asks the Integration for the effective priority.

Workers

  • Use `php artisan horizon` to supervise workers. Supervisors/queues are defined in `config/horizon.php`.
  • Environments section defines processes/memory per supervisor for `production`/`local`.

Schedules

  • In containerized deployments we use Ofelia to run periodic jobs (see `compose.production.yml`).
  • Example jobs:
  • - Attribute import every 5m → `php artisan akeneo:import:data attribute`

    - Product import every 5m → `php artisan akeneo:import:data product`

    - Dispatch queued mutations every 10m → `php artisan mutations:dispatch integrations-normal --limit=1000`

Monitoring

  • Horizon dashboard: `/horizon` shows queue health, failures, retries.
  • `ProcessMutationJob` surfaces errors via `last_error` and status on `mutation_jobs`.

Retries

  • `ProcessMutationJob::tries()` and `backoff()` read from the `Integration` config, enabling per-integration retry strategy.

External References

  • Laravel Queues: https://laravel.com/docs/12.x/queues
  • Laravel Horizon: https://laravel.com/docs/12.x/horizon
  • - Redis: https://redis.io/docs/

Docs Index

Current file: docs/iec/04-queue-and-horizon.md