How Magento Open Source message queue consumers keep background work running
A self-hosted Magento Open Source store that depends on asynchronous work usually fails quietly. The storefront keeps serving pages while queued operations wait, pile up or stop, so the first sign is often a backlog that nobody is watching. Message queue consumers are the processes that read messages from a RabbitMQ queue and carry out the work those messages describe, such as bulk operations and other tasks Magento hands off to run outside the request. A production plan is needed as soon as the store relies on these operations for daily business, because the broker, the consumer processes and the cron jobs that start them must all be installed, versioned and monitored as one system. Confirm in Adobe's documentation for your release which operations are queued in your version, so you know which business processes will stall if consumers stop.
The broker version is the first decision. Adobe's system requirements for 2.4.9 and 2.4.8-p5 both list RabbitMQ 4.3, and Adobe supports only the combinations it lists, so an older broker is outside the support boundary even if it appears to run. Check the RabbitMQ release information for the community and commercial support dates of the version you plan to run, because the community support window for 4.2 has already closed. RabbitMQ also removed classic queue mirroring starting with 4.0, and its replicated structures are quorum queues and streams. Before you design high availability for the broker, confirm with Adobe which queue types your Magento release supports, and record that decision with the broker version in your change log.
Choosing between the MySQL queue and RabbitMQ
Magento Open Source can run its asynchronous operations through the database-backed queue, which stores messages in MySQL tables and uses the same database the store already depends on. For a single-node store with modest background work, this keeps the moving parts small: no separate broker to install, patch, back up or monitor. The consumers still run through the consumers_runner cron job, so the operational model is familiar to teams that already maintain Magento cron.
- Fewer components: no broker to license, deploy, secure or upgrade alongside the stack.
- Shared failure domain: queue messages live in the same database as orders and catalog data, so backup and restore cover them automatically.
- Simpler local work: developers can reproduce consumer behavior without running extra infrastructure.
- Limited throughput headroom: heavy bulk operations compete with storefront reads and writes for the same database.
- Cron dependency: if cron stops, queued work stops with it, so cron monitoring becomes part of queue health.
Before you commit, confirm your peak message volume from the admin and logs, and check the Adobe documentation for the queue configuration that matches your release.
RabbitMQ is the broker Adobe lists in the system requirements for Magento Open Source 2.4.9 and 2.4.8-p5, specifically RabbitMQ 4.3 for both lines. Moving consumers onto it separates message traffic from the transactional database and gives you broker-level controls such as dedicated queues, replication and independent scaling of consumer processes. It becomes a sensible choice when background volume is high, when several consumers compete for the same database, or when you need the broker to survive node failures without losing acknowledged messages.
- Dedicated broker: message traffic leaves the database, reducing contention during imports and bulk updates.
- Replicated queues: RabbitMQ's quorum queues use the Raft consensus algorithm for durable, replicated storage.
- Independent capacity: consumer process counts can be tuned against broker capacity rather than database headroom.
- More to operate: you own broker sizing, TLS, credentials, backups of definitions and version upgrades.
- Version discipline: RabbitMQ 4.3.6 was released on September 16, 2026 with community support until January 31, 2027, so confirm which release your support plan covers.
Confirm the exact RabbitMQ patch level that your Magento release lists before you build, because Adobe supports only the listed combinations.
The two options fail differently, and the monitoring has to follow those differences. With the database queue, a stuck consumer usually shows up as growing rows in the queue tables, slow database queries or a stalled cron run. With RabbitMQ, the broker exposes queue depth, unacknowledged messages and consumer counts, which give earlier warning, but you now have a second system whose health decides whether orders and updates are processed.
- Queue depth alerts: alert on sustained growth in pending messages, not single spikes.
- Consumer liveness: check that each consumer process is running and acknowledging messages.
- Broker health: monitor disk, memory, file descriptors and cluster membership if you run more than one node.
- Dead or failed messages: decide who reviews failed messages and how they are retried or discarded.
- Restore testing: rehearse recovery for both the database and the broker so pending work is not silently lost.
Agree these alert thresholds and the owner of each alert with your operations team before go-live.
The right choice depends on numbers that only your store can provide. Estimate message volume by counting the operations that generate queued work, such as bulk imports, inventory feeds, order export and ERP synchronization, and by measuring how long those jobs take under real load. An illustrative store that runs a nightly ERP sync and frequent stock updates has a very different profile from one that processes a few background jobs an hour, so measure instead of assuming.
- Peak messages per hour: measure during your busiest integration windows, not averages.
- Consumer runtime: record how long each consumer type takes per batch, since long runs affect Supervisor and process count decisions.
- Database headroom: check whether queue activity pushes database load past acceptable limits during peaks.
- Integration cadence: list which ERP, payment and shipping jobs run in parallel.
- Growth plan: confirm the volume you expect in the next release cycle, not only today's.
Request a written sizing review from your partner or internal team that shows these measurements and the decision they support.
Consumer settings and when each fits
This table compares the settings that control how Magento Open Source consumers run, what each one trades off, and the symptom that tells you to change it. Read each row as a lever, not a default to keep, because the right values depend on queue depth, job duration and how much the host can run in parallel. Confirm exact key names and behavior against the documentation for your installed version before you change production configuration.
| Setting or model | What it controls | Trade-off | Signal that it needs tuning |
|---|---|---|---|
| cron_consumers_runner cron_run | Whether the consumers_runner cron job starts consumers on each cron cycle | Simple to operate, but consumers stop when cron stops and wait for the next cycle | Queues grow while cron runs look healthy, or cron jobs overlap and pile up |
| cron_consumers_runner max_messages | How many messages a consumer processes before it exits and is restarted | Higher values reduce restarts but hold memory longer and delay config or code changes | Memory use climbs over time in consumer processes, or PHP memory errors appear in logs |
| cron_consumers_runner consumers list | Which consumers the runner starts, so unused consumers can be left out | Fewer consumers means less load, but a missing consumer leaves its queue unprocessed | A queue has backlog but no consumer activity, or a consumer you expect never starts |
| queue:consumers:start --max-messages | Message limit for one manually or Supervisor-started consumer process | Same restart cost and memory trade-off as the runner limit, applied per process | Long-running Supervisor workers show rising memory or slow drift in processing time |
| Process count per consumer | How many parallel processes handle one queue, set by how many workers you start for it | More processes raise throughput but add database, RabbitMQ and PHP-FPM load and can cause lock contention | Backlog persists during peaks while CPU and database headroom remain, or deadlock and lock wait errors rise |
| Supervisor-managed workers | Long-running consumer processes kept alive and restarted by Supervisor | Steady throughput and fast pickup, but you own process monitoring, restarts and config reloads | Workers exit repeatedly, or the queue lags even though cron-based runs would have caught up |
| Cron-triggered runs only | Consumers that start on each cron cycle and exit when the queue is empty or the limit is reached | Less infrastructure to manage, but latency depends on cron frequency and each run pays startup cost | Order confirmations or stock updates arrive late, or cron frequency cannot be raised without overlap |
| consumers_wait_for_messages | Whether a consumer keeps waiting for new messages instead of exiting when the queue is empty | Lower startup overhead and faster pickup, but the process holds resources while idle | Idle consumer processes accumulate, or repeated start and stop cycles fill logs |
Setting up consumers for production
This sequence takes a Magento Open Source store from a confirmed software stack to message queue consumers that run on schedule, restart after failures and survive a server reboot. Each step ends with a check so the team can see the consumers working before go-live.
Confirm the stack for your release line
Before changing anything, the platform engineer checks the PHP, RabbitMQ, Composer and other component versions against Adobe's system requirements for the exact Magento Open Source release in use. Adobe supports only the listed combinations, so a version that appears to work but is not listed is a risk to raise with the vendor. Record the versions in the runbook. The step is done when every component version is written down and matches a supported combination for the release.
Point the store at RabbitMQ
The developer or platform engineer adds the AMQP connection details to the environment configuration file, typically
app/etc/env.php, under the queue settings, using the host, port, virtual host and a dedicated user that has only the permissions the consumers need. Credentials should come from the secrets store used for the deployment, not from the repository. Confirm the RabbitMQ server version against the supported release line before testing the connection. The step is done when the store connects to the broker from every node that runs consumers, which can be checked by publishing a test message and reading it back from the broker's management view.Enable the consumers the store uses
The developer lists the consumers the installed modules register and decides which ones the store needs. Consumers are enabled or disabled through the Magento command line, and the configuration is then saved so every node reads the same setting. Turning off a consumer that a module depends on can stop orders, stock or customer updates from processing, so the team should check the consumer list against the module inventory with the vendor's documentation in hand. The step is done when the list of enabled consumers is recorded and the command output shows each one as expected.
Schedule the consumers_runner cron job
The platform engineer confirms that the Magento cron job is running on the schedule the store depends on, because the
consumers_runnerjob is what starts consumers that are not running under a process manager. The team sets the maximum number of messages and the process counts for each consumer according to the expected load and the server sizing, and monitors the effect during testing. The cron user must have write access to the logs and must not conflict with other scheduled tasks. The step is done when the cron entry is present for the web user, the cron log showsconsumers_runnercompleting without errors, and the consumer processes appear in the process list.Add Supervisor programs for long-running workers
The operations engineer creates one Supervisor program definition for each long-running consumer that needs continuous processing, setting the command, the user, the working directory, the restart policy and the log file paths. Program definitions are kept in version control with the rest of the deployment. Each consumer should run under a single supervisor program with a clear name, so restarts and logs are easy to trace. The step is done when
supervisorctl statusreports every program as running and a test message published to each queue is processed.Watch queue depth during a controlled test
The QA or operations engineer publishes a known batch of messages to the queues and watches the queue depth in the RabbitMQ management view until it drops back to zero. The team records how long the backlog takes to clear, which consumers handle which messages and whether any messages land in a failed or dead letter state. Test results should be compared against the sizing decisions made in the previous steps. The step is done when the backlog clears without manual intervention, no messages fail silently, and the results are written up for the team.
Confirm processes restart after a reboot
The operations engineer reboots a test node, or the staging node that mirrors production, and checks that Supervisor starts and the consumers come back without manual action. The team confirms that the cron entry is still present and that the consumers reconnect to RabbitMQ and resume processing a test batch. The reboot test should be repeated after any change to the Supervisor configuration or the server image. The step is done when the consumers are running after the reboot and a fresh test batch is processed end to end.
Cron starts the consumers, and Supervisor keeps them running
The flow starts with the system cron scheduler, which triggers the consumers_runner job. That job starts consumer processes that read messages from the RabbitMQ broker, which sits in a separate broker network behind the trust boundary. Consumers write results to the database and record failures in Magento logs. Supervisor watches the long-running worker processes and restarts them when they stop. When you review the setup, confirm that the broker accepts connections only from the web tier and that restarts appear in your logs.
Cron starts consumers, which move messages through RabbitMQ with Supervisor restarting them.
Where consumers fail in production
Most consumer failures in a Magento Open Source store do not show up as errors on the storefront. They show up as messages that sit unprocessed, workers that drift out of date, or queues that grow quietly for days. Each pattern below names the symptom an operator sees first and the check that confirms the cause.
Consumers not running because cron is stopped
Magento's consumers_runner cron job starts and restarts the consumers, so when cron stops executing, nothing consumes messages even though the broker is healthy. The usual symptom is a queue that only grows while the store looks normal. Check that the cron schedule runs on every web and cron node, confirm the cron log shows recent consumers_runner activity, and compare queue depth against the time of the last run. Ask your team which node owns cron before any incident.
Memory growth in long-running workers
A consumer is a PHP process that stays alive to handle many messages, so memory held by caches, loaded objects or leaked references can climb over time. The symptom is a worker that slows down, then gets killed by the operating system or the PHP memory limit. Watch resident memory of each consumer process over several hours, and check the consumer logs for fatal memory errors. Set the message limit per process so workers are replaced on a predictable schedule.
Backlog that never drains
A backlog can persist even when every consumer is running, because the consumer count is too low for the message volume or one slow handler blocks the others. The symptom is a queue depth that stays flat or rises during normal traffic and falls only at quiet hours. Compare the arrival rate of messages with the processing rate over a day, and check whether a single topic holds most of the backlog. Confirm the process count for each consumer before adding more.
Broker connectivity loss
Consumers depend on RabbitMQ for every message, so a dropped connection, a expired credential or a full broker disk stops processing without touching the storefront. The symptom is consumer logs full of connection errors and a queue that stops moving at the same moment for every consumer. Check broker health and disk alarms, confirm the connection settings in the environment configuration match the broker, and test reconnection after a planned broker restart.
RabbitMQ release informationDuplicate or stuck messages after restarts
When a worker stops mid-message, the broker may redeliver that message, so a handler can run twice or a message can stay unacknowledged for a long time. The symptom is an order or stock update applied twice, or a queue that reports unacknowledged messages that never clear. Review how each custom handler behaves when it runs again, check the unacknowledged count after a restart, and confirm with your developers that handlers are written to tolerate repeated delivery.
Old workers left running after deploys
A deploy that updates code while old consumer processes keep running can leave workers executing stale classes against a new schema or configuration. The symptom is errors that appear only after a release, or a handler that behaves differently from the code in the repository. Check process start times against the latest deploy, confirm that the deploy steps restart consumers, and make the restart part of every release checklist.
Questions teams ask before running consumers in production
What does it cost to run Magento message queue consumers in production?
Cost comes mostly from the people who design, build and operate the setup, not from software licenses, because Magento Open Source is free to use and the consumers run on the store's own hosts. The main one-time costs are reviewing which queues the store uses, setting consumer counts, building the Supervisor and cron configuration, and testing under load. Recurring costs include monitoring queue backlog, patching the broker and PHP stack, and rechecking consumer settings after each Magento upgrade. Costs rise with the number of custom consumers, the volume of messages from integrations such as ERP or order feeds, and how strict your uptime and alerting expectations are. Ask any partner for a written scope that lists each queue, each consumer, the monitoring setup and the upgrade work, then price those items separately.
How long does a typical consumer setup take, and why does it vary?
Duration depends on how many queues and custom consumers the store has, how much of the work is standard Magento configuration, and how much of it is new code. A store that uses only the core consumers and a single cron-driven runner needs less time than one with several custom integrations that publish and consume messages at volume. Timelines also stretch when the team lacks a staging environment that matches production, when broker access takes time to approve, or when load testing reveals consumers that stall under peak traffic. Ask for a timeline split into discovery, configuration, Supervisor setup, testing and handover, and confirm which items depend on your own infrastructure approvals.
What must our team provide before consumers can run reliably?
The work needs access and decisions from your side before the first configuration change. Typical requirements include:
- A staging environment that matches production PHP, Magento and broker versions
- Shell access to the web or worker hosts, with rights to edit cron and install Supervisor
- Broker access for the message queue, including credentials for the vhost the store uses
- Permission to change
env.phpand the consumer settings in your deployment pipeline - Named owners for alerting, on-call response and approval of production changes
If any of these sit with a separate infrastructure or security team, agree on access paths and approval steps in the scope before work starts.
Can our in-house team run Magento message queue consumers without a partner?
Yes, if your team already runs PHP services on Linux and has someone comfortable with Magento's cron and deployment tooling. The configuration itself is documented in Adobe's guides, and the core tasks are setting consumer counts, scheduling the consumers runner through cron, and keeping long-running workers alive with Supervisor. The skill gap usually appears in three places: diagnosing a stuck consumer, sizing workers against real message volume, and keeping the setup correct through each Magento patch and PHP upgrade. A partner is most useful when the team lacks that operational depth or needs the work done within a fixed schedule. Evaluate your team against those three areas before deciding.
What drives the effort of running consumers at higher queue volume?
Effort grows with the number of messages per hour, the number of distinct consumers, and how long each message takes to process. High-volume stores need more consumer processes, which raises memory and CPU needs on the workers and makes concurrency and locking issues more likely. Each custom consumer adds code to review, test and upgrade. Monitoring effort rises with volume because backlog and failure rates have to be watched, not just whether the process is running. Ask for a sizing estimate based on your measured message rates and processing times rather than on store traffic alone.
When should we move off the MySQL queue to RabbitMQ?
Consider moving when the MySQL-backed queue cannot keep up with message volume, when consumer backlog grows faster than you can clear it, or when you need stronger delivery guarantees and separation between the store database and messaging. Magento supports RabbitMQ as a broker, and the decision also affects where the broker runs, who operates it and how it is backed up. RabbitMQ 4.3 is the current release line in Adobe's requirements for 2.4.9, and the broker's own documentation describes quorum queues as durable, replicated queues based on the Raft consensus algorithm, which matters when you plan for failover. Confirm the supported RabbitMQ version for your Magento release in Adobe's system requirements before you choose.
How do upgrades affect message queue consumers?
Magento upgrades can change consumer names, queue topology, PHP requirements and the broker versions Adobe supports, so consumer configuration should be retested after each patch or minor release. Adobe recommends upgrading every patch cycle for security, and the upgrade effort grows with custom consumers and third-party integrations that publish messages. Plan a staging test that drains queues, restarts Supervisor programs and confirms that no messages are lost or stuck. Ask any partner to include consumer checks in the upgrade test plan and to document the Supervisor and cron configuration so your team can repeat the checks later.
How consumer setup changes across Magento and RabbitMQ upgrades
Consumer configuration has to be retested with every Magento patch and every release line, not only when the platform moves to a new minor version. Adobe recommends upgrading every patch cycle to stay secure and PCI compliant, and its upgrade guide names customizations, extension count, third-party integrations and coding practices as the drivers of upgrade effort. Each of those drivers can change how queued messages are published and consumed. A custom module that publishes to a topic, an extension that adds its own consumer, or a third-party integration that depends on a specific consumer name can all break quietly after an upgrade. Before each patch, list every consumer your store runs, including custom and extension consumers, and confirm each one still starts, processes a test message and writes its expected result. Use the Upgrade Compatibility Tool referenced in Adobe's upgrade guide as a starting point, not as a substitute for that check. Run the same check against the consumers_runner cron job and any Supervisor-managed workers, because a patch can change how the runner launches consumers.
RabbitMQ has its own lifecycle, and it does not move on the same schedule as Magento. Adobe's system requirements for the 2.4.9 line list RabbitMQ 4.3, and the 2.4.8-p5 requirements also list RabbitMQ 4.3. Treat the broker as a dependency with its own upgrade track. Confirm the exact broker version your Magento release line supports before you upgrade either side, and retest consumer throughput, connection handling and queue declarations after any broker change. RabbitMQ publishes community support end dates per release, and its release information page states that long-term support beyond those dates requires a valid commercial support license, with lifecycle details on the Broadcom support portal. Decide early which support model applies to your broker, because an unsupported broker version leaves the message path without vendor fixes even if Magento itself is current. Ask your hosting or support provider to confirm in writing which RabbitMQ version and support tier they will maintain for the life of the store.
How DeployOpen works on this
DeployOpen plans, implements, hardens, documents and supports self-hosted Magento Open Source stores inside the client's own infrastructure. For queue consumers, that means agreeing the consumer layout, runner settings and broker choice in writing before anything is changed, then handing over a runbook your operations team can follow after the engagement ends.
How we scope
- The written scope lists which consumers run, on which nodes, and which queues they read.
- We record the current cron, consumer and broker setup, including whether queues still use the MySQL table.
- The scope names the RabbitMQ version, PHP-FPM and Supervisor setup, and the monitoring you will receive.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- We configure the consumers_runner cron job and set max messages and process counts for your workload.
- Where needed, we move queue traffic from the MySQL queue to RabbitMQ and test message delivery end to end.
- Long-running workers are placed under Supervisor with restart rules, log locations and resource limits written down.
- We test failure paths, including a stopped broker and a consumer that crashes mid-batch, and record the results.
How we hand over
- You receive a runbook covering start, stop, restart and status commands for every consumer and runner.
- The handover includes the configuration files, Supervisor program definitions and broker settings as versioned artifacts.
- We document the upgrade checks to repeat on each Magento patch and each RabbitMQ release you adopt.
- Your team walks through the runbook with us so operators can confirm each procedure on their own environment.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, scoped in writing.
- Retainer work can cover reviewing queue backlog and consumer logs after Magento patch releases.
- Broker lifecycle checks are scheduled against the RabbitMQ support dates your team confirms with the vendor.
- Support scope, response expectations and any SLA are defined in the retainer agreement, not assumed.

