Download the PHP package hirale/queue without Composer

On this page you can find all versions of the php package hirale/queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package queue

Hirale Queue

A queue module for OpenMage and Maho, built on Symfony Messenger. Backend-agnostic by design: Redis Streams ships in v3.0, with Doctrine / AMQP / SQS as drop-in transports later.

Which version do I need?

Your platform Package Constraint
Maho 26.5+ hirale/queue ^3.0
OpenMage 20.17+ (PHP 8.3+) hirale/queue ^3.0
Older OpenMage / legacy installs hirale/openmage-redis-queue ^1.0 (frozen, fixes only)

One codebase serves both platforms: the module uses OpenMage-era class names that Maho aliases natively, and the only platform difference you will notice is the worker entry point (Maho CLI vs shell/ scripts).

v3 was previously published as hirale/openmage-redis-queue; the rename to hirale/queue reflects the rewrite. Upgrading a v1 install is a breaking change — see Migrating from v1.x below.

What's new in v3

Requirements

Install

OpenMage: one-time composer adjustments

Two stock-OpenMage facts need one-time tweaks. The pinned magento-hackathon/magento-composer-installer cannot serve a project that uses Symfony Messenger: its 3.x/4.x releases require symfony/console ≤5 (Messenger 7/8 conflicts with console <7.2), and its only console-free release (1.3.2) is a Composer 1 plugin that deploys while Composer 2 is still extracting archives, aborting every dist install. OpenMage also locks dependency resolution to PHP 8.1 via config.platform, which would reject this package's PHP 8.3 floor.

In your project root:

hirale/magento-module-installer is a zero-dependency Composer 2 plugin that deploys extra.map and modman modules after extraction completes. It replaces the legacy installer, so the stock root requirement keeps resolving — nothing to remove — and existing modman-based packages (openmage_ignition, the Cm redis modules, …) keep deploying. It copies this module into app/, including the five shell/hirale_queue_*.php entry points; composer magento-module-deploy re-deploys everything idempotently.

Create the four queue tables (hirale_queue_job, hirale_queue_job_event, hirale_queue_job_archive, hirale_queue_audit):

Configure

Open System → Configuration → Hirale → Queue in admin.

Section Scope What it controls
Backend Global Backend picker (Redis / Doctrine / AMQP / SQS) plus per-backend connection fields (host, port, password, socket path, etc.).
Queues Global Comma-separated list of logical queue names. The default queue is always present.
Operational Per-website Retry policy (retry_max_attempts, retry_backoff_base_seconds, retry_backoff_cap_seconds), payload size cap, redacted fields, audit toggle.
Retention Per-website Days to keep successful / failed / archived jobs; nightly archive batch size.

Backend connection is global (infrastructure does not vary by store). Operational and retention values can be overridden per-website using the native admin scope selector.

When you click Save Config, the module assembles the DSN and tries to connect to the backend. If the probe fails, the form refuses to persist and shows the error — your previous values stay intact.

Producer API

Downstream modules dispatch typed messages:

Variants:

The current store context is captured automatically. Don't pass store_id in the message — Bus attaches a StoreScopeStamp for you, and the per-store retry policy is read at dispatch time.

Handler registration

In your downstream module's etc/config.xml, under <global>:

The element name is the MessageClass FQCN (use underscored class names — XML element names cannot contain backslashes, so PSR-4 namespaced messages are not supported on the routing side; declare them as legacy Vendor_Module_* classes).

Handler:

Unmapped messages route to the default queue.

Consumer

Long-running worker — Maho:

OpenMage (same engine, shell entry point):

With options (Maho shown; the shell worker takes the same options as --queues a,b --time-limit ... --limit ... --sleep ... --memory-limit ...):

Run under systemd or Supervisor so the process restarts after --time-limit or --limit.

systemd example

Cron / Ofelia example

Without systemd, run the worker from cron with flock (or Ofelia's no-overlap) guaranteeing a single instance; the worker exits after --time-limit and is relaunched on the next tick:

Maho's own cron (./maho cron:run default / always) must also be scheduled — it runs the nightly hirale_queue_archive job (archive move + retention purges, including the event and audit tables).

CLI commands

Command Purpose
hirale:queue:test [--queue=] [--timeout=] End-to-end self-test: dispatches a built-in ping, consumes it inline, asserts the job reached succeeded. Run this first on a fresh install.
hirale:queue:consume [<queue>...] Run a worker against the listed queues.
hirale:queue:stats [--format=text\|json] Per-status totals and per-queue depth. JSON output suits the Prometheus textfile collector.
hirale:queue:health [--max-age=N] Liveness probe: pings the backend and fails if any active job is older than --max-age seconds (default 300). Exit 0 healthy, 1 unhealthy.
hirale:queue:retry-failed [--queue=] [--since=] [--limit=] Bulk re-dispatch of failed jobs from the DB (--since accepts strtotime syntax, e.g. "-2 hours"). Each retry is a fresh dispatch; the old row is marked superseded so reruns never double-dispatch.

Admin operations

System → Tools → Hirale Queue shows:

A Test Connection button also sits below the backend fields in System → Configuration → Hirale → Queue — it probes the values currently entered in the form, before saving.

All admin actions are recorded in hirale_queue_audit when audit logging is enabled; audit rows are purged by the nightly cron after audit_retention_days (default 90).

Migrating from v1.x

v3 intentionally breaks API compatibility with the v1 line (hirale/openmage-redis-queue ^1.0):

The handler interface, payload format, DB schema, and config paths all changed. Upgrading an existing OpenMage install:

  1. Apply the one-time composer adjustments from Install → OpenMage, then composer remove hirale/openmage-redis-queue && composer require hirale/queue
  2. Setup scripts create the v3 tables automatically (v1 tables are left untouched; drop them once you no longer need the history).
  3. Reconfigure the backend once under System → Configuration → Hirale → Queue (config paths changed; save-time validation checks the connection).
  4. Migrate every producer and handler to typed messages and __invoke handlers (see Producer API and Handler registration above), or update the consuming modules to their v3-compatible releases.
  5. Run the self-test: php shell/hirale_queue_test.php.

Development

The unit suite covers DSN assembly per backend, message routing (SendersLocator), retry strategy semantics (including the unrecoverable/recoverable exception markers), message reconstruction, and stamp construction. For a live end-to-end check against a real install, use ./maho hirale:queue:test.

License

Open Software License v. 3.0 (OSL-3.0). See LICENSE.md.


All versions of queue with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-json Version *
ext-redis Version *
symfony/messenger Version ^7.4 || ^8.0
symfony/serializer Version ^7.4 || ^8.0
symfony/redis-messenger Version ^7.4 || ^8.0
monolog/monolog Version ^3.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hirale/queue contains the following files

Loading the files please wait ...