Skip to content
Magento glossary

What is Magento RabbitMQ?

Short answer Magento RabbitMQ means using RabbitMQ as an external message broker through Commerce's AMQP integration. Modules publish messages and PHP consumers process the queued work. Cron can start consumers, but it is not the broker. Check each feature's required connection and consumers rather than assuming that every installation has the same queue workload.

How it works
  1. A feature publishes a message 01
  2. Configuration selects the connection and route 02
  3. The broker holds work for consumers 03
  4. A PHP consumer performs the application work 04
  5. Worker supervision and delivery failures are monitored 05
Each step is explained below

Watch for this Consumer definitions are mistaken for running workers

How it works

From a published topic to completed application work

A publisher, broker and consumer handle different parts of the work. Trace those responsibilities before deciding whether a backlog is a routing, worker or application problem.

  1. 01

    A feature publishes a message

    A module can send a named topic and payload through Commerce's Message Queue Framework. This separates the request that creates work from the process that handles it. Only features implemented to use a queue gain this behavior; installing a broker does not automatically move all store operations into the background.

  2. 02

    Configuration selects the connection and route

    Publisher, topology and consumer configuration connects the topic to an exchange, queue and handler. Commerce supports RabbitMQ through AMQP, as well as other documented adapters. Confirm the module's selected connection, project virtual host and supported broker version instead of assuming that every queue uses RabbitMQ.

  3. 03

    The broker holds work for consumers

    RabbitMQ routes messages according to the configured exchanges and bindings. Queue durability, replication and delivery settings affect recovery behavior. A broker accepting a message does not prove that its application handler finished successfully.

  4. 04

    A PHP consumer performs the application work

    A defined consumer receives messages and invokes its handler. Bulk API and some inventory operations are examples, but available consumer names depend on installed modules and edition. The command queue:consumers:list lists definitions; it does not report which worker processes are currently alive.

  5. 05

    Worker supervision and delivery failures are monitored

    Cron can restart consumers, or a process manager can supervise them. Coordinate those mechanisms and monitor handler failures as well as worker liveness. Messages can be delivered again after connection or processing failures, so handlers need a deliberate retry and repeat-processing strategy.

When to use

When an external queue broker is considered

Choose a broker against supported features and observed workload. An edition name or order count alone does not size or validate the design.

  • A feature depends on asynchronous processing

    Check the feature's documented consumers and supported connection. Adobe lists which consumers apply to each edition and feature set. An edition name alone is not a useful substitute for checking the installed modules and broker requirements.

  • Database-backed queues have become a constraint

    The MySQL adapter is an available basic queue mechanism, but Adobe recommends an external broker for production where possible. Investigate message arrival rate, completion rate, age and handler cost before planning a move. There is no universal orders-per-day threshold for choosing RabbitMQ.

  • Bulk operations need an observable backlog

    Queue-backed imports or mass actions can finish after the initiating request returns. Monitor their actual completion and errors instead of treating an accepted request as completed work. A broker does not make a slow handler or unavailable downstream system fast.

  • An integration needs controlled background work

    A connector may publish work for ERP, PIM or other services. Review its delivery, retry and duplicate-handling design. Queue isolation can help manage load, but it does not guarantee that every external request will eventually succeed.

Common mistakes

Three queue-processing assumptions to avoid

A healthy broker does not prove that workers are alive, handlers are succeeding or retry behavior is safe.

  • Consumer definitions are mistaken for running workers

    A listed consumer can have no live process attached to its queue. Compare the configured definitions with the process manager, broker consumer count and successful handler activity. Queue depth without delivery and completion rates gives an incomplete picture.

  • Workers exit without an agreed restart mechanism

    A consumer can exit after its configured message limit, a failure or a resource problem. That is different from proving a memory leak. Give each worker an explicit lifecycle owner and inspect exit reasons before increasing limits or launching extra processes.

  • Retry and duplicate handling are assumed

    More workers do not guarantee exactly-once processing. Redelivery is part of a distributed queue's failure behavior. Review the handler's idempotency, acknowledgement and retry rules, and coordinate cron and process-manager ownership rather than assuming that duplicate launch mechanisms are harmless.

FAQ

Magento RabbitMQ: frequently asked questions

  • RabbitMQ vs the MySQL queue: when must I use RabbitMQ?
    Follow the feature's requirements and the supported brokers for the exact Commerce release. Commerce documents RabbitMQ, ActiveMQ Artemis and a basic MySQL adapter. Adobe recommends an external broker for production where possible, but there is no universal order count that makes RabbitMQ mandatory. A broker change also needs the application's connection, topology and consumers to be reviewed.
  • How many consumers should I run, and how many workers per queue?
    Start from the consumers required by the installed features, then measure arrival rate, processing rate, message age and resource use. The number of workers depends on handler cost and whether parallel processing is safe. Adobe does not recommend multiple consumers on a MySQL-operated queue. Do not select a worker-per-CPU ratio without testing the actual workload.
  • Why are my consumers dying silently after a few hours?
    Check the exit reason first. A process may have reached its message limit, failed, been terminated by the operating system or lost a dependency. Inspect application and process-manager logs before changing memory settings. Configure restart behavior through the chosen process manager or cron runner, and confirm that a restarted worker successfully processes work.
  • Can I cluster RabbitMQ for high availability, and what is the right sharding strategy?
    RabbitMQ supports replicated quorum queues, while classic queue mirroring was removed in 4.0. Replication and sharding solve different problems, and queue type is not changed safely by adding a server. Check the broker version, application declarations and provider support, then test recovery and message handling. Do not assume a managed Commerce environment provisions a particular highly available topology.
  • Does Hyvä affect queue or consumer usage at all?
    A storefront theme does not replace publishers, brokers or consumers. Extensions and integrations installed with a storefront project can still introduce or change asynchronous work. Review those modules and test their workflows. A theme change alone does not establish a queue-throughput gain or remove the need to operate workers.
  • How do I monitor queue depth and consumer health in production?
    Combine broker queue metrics with worker supervision and application outcomes. Ready messages are waiting for delivery; unacknowledged messages have been delivered but not yet acknowledged. Compare those values with publish and delivery rates, consumer count and job completion. The available-consumer list is configuration evidence, not a process-health check. See RabbitMQ's monitoring guide.
Queue audit

Need help investigating asynchronous processing?

Describe the affected operation, broker and consumer setup when discussing the work. An investigation can then be scoped around message delivery, handler behavior and recovery requirements.

Kishan Savaliya Online 10 AM to 7 PM IST Chat on WhatsApp