PHPackages                             human-element/module-advanced-message-queue-options - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. human-element/module-advanced-message-queue-options

ActiveLibrary[Queues &amp; Workers](/categories/queues)

human-element/module-advanced-message-queue-options
===================================================

Module that allows advanced configuration of the message queue system

0.0.1(6y ago)414.2k↓50%PHPPHP &gt;=7.0.0

Since Oct 11Pushed 6y ago4 watchersCompare

[ Source](https://github.com/humanelement/module-advanced-message-queue-options)[ Packagist](https://packagist.org/packages/human-element/module-advanced-message-queue-options)[ RSS](/packages/human-element-module-advanced-message-queue-options/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

HumanElement\_AdvancedMessageQueueOptions
=========================================

[](#humanelement_advancedmessagequeueoptions)

This module adds the ability to set a directory for the message queue consumers PIDs under the var directory.

That way you can share that directory and not loose track of the PIDs between deployments

It also gives you a CLI command to create an updated poison pill version.

This allows you to choose at the end of a deployment to have Magento restart the consumers

It is also recommended to install a patch to get the consumers\_wait\_for\_messages feature that way even when there is no messages to process between deployments and thus your poison pill won't kill the process you will know a new process with your new deployment directory will be started.

Installation
------------

[](#installation)

```
composer require human-element/module-advanced-message-queue-options
php bin/magento module:enable HumanElement_AdvancedMessageQueueOptions
php bin/magento setup:upgrade

```

Changing Consumer PIDs to a directory
-------------------------------------

[](#changing-consumer-pids-to-a-directory)

You can change to use a directory under var for your message consumer PIDs using the following option in your env.php

```
return array (
    'cron_consumers_runner' => array(
        'pid_dir' => 'mqpid'
    )
);

```

This will put the message queue PIDs into var/mqpid instead of the root of var

This will put a new poison pill version into the database causing all the consumers to restart the process on the next message
------------------------------------------------------------------------------------------------------------------------------

[](#this-will-put-a-new-poison-pill-version-into-the-database-causing-all-the-consumers-to-restart-the-process-on-the-next-message)

php bin/magento he:queue:consumers:poison

Recommended Patch
-----------------

[](#recommended-patch)

[This is the patch file](recommended_patches/composer/message-consumer-wait-for-messages-option.patch)

composer patches json config:

```
{
  "patches": {
    "magento/framework-message-queue": {
      "Adds message queue option consumers_wait_for_messages from https://github.com/magento/magento2/commit/4e960c31bf345f59a4eccc16832a3a737d4ce8b8 ": "patches/composer/message-consumer-wait-for-messages-option.patch"
    }
  }
}

```

### Patch Usage

[](#patch-usage)

This adds the consumers\_wait\_for\_messages option to set in your env.php

```
return array (
    'queue' => array(
        'consumers_wait_for_messages' => false
    )
);

```

This option fixes consumers causing issues with running to long, but it also causes annother issue where unnecessary memory is being used to spawn processes that kill themselfs every minute: Fixes one problem and causes another, least for now, the above proposal is a detect if there is messages and only spawn consumers when they exists option.

Related Issues
--------------

[](#related-issues)

[magento/magento2#23540](https://github.com/magento/magento2/issues/23540)

[magento/magento2#17951](https://github.com/magento/magento2/issues/17951)

[magento/community-features#181](https://github.com/magento/community-features/issues/181)

[magento/architecture#232](https://github.com/magento/architecture/pull/232)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2411d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6f4b0d6aadb51861df0e1919f1c658a33199a5166ce9a11714a1d79154716c5?d=identicon)[human-element](/maintainers/human-element)

---

Top Contributors

[![Luwdo](https://avatars.githubusercontent.com/u/9387842?v=4)](https://github.com/Luwdo "Luwdo (5 commits)")

### Embed Badge

![Health badge](/badges/human-element-module-advanced-message-queue-options/health.svg)

```
[![Health](https://phpackages.com/badges/human-element-module-advanced-message-queue-options/health.svg)](https://phpackages.com/packages/human-element-module-advanced-message-queue-options)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2228.8M171](/packages/react-async)[react/promise-stream

The missing link between Promise-land and Stream-land for ReactPHP

11512.9M45](/packages/react-promise-stream)[illuminate/bus

The Illuminate Bus package.

6043.8M409](/packages/illuminate-bus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
