Magento message queues without guesswork: Bricklayer message-queue-inspect

Just enough inspection to see how a Magento message queue is wired, without opening four XML files per module.

A single Magento queue is spread over four files: communication.xml (the topic), queue_publisher.xml (who publishes and where), queue_topology.xml (exchanges and bindings) and queue_consumer.xml (who consumes and with which handler). Multiply that by every module that defines queues, add a RabbitMQ vs MySQL connection difference, and “why is this message not being consumed” turns into an afternoon.

message-queue-inspect reads all four, from every module, merged at runtime, and gives one picture: consumers, topics, queue/exchange bindings, publishers and handlers.

Parameters

All optional:

Parameter Default Description
consumer "" filter consumers by name substring; also scopes the topic sections
topic "" filter topics, bindings and publishers by name substring
verbosity standard minimal, standard, detailed

The whole wiring of the install:

message-queue-inspect verbosity="minimal"

Everything around one topic, from publisher to handler:

message-queue-inspect topic="vendor.queue.custom.operation"

One consumer and the topics it is tied to:

message-queue-inspect consumer="vendor.queue.custom"

Each section degrades on its own. A module without queue_topology.xml does not break the output, You just get no bindings for it, which is often exactly the bug You are looking for.

Workflow

Let’s assume messages get published but nothing happens.

  1. message-queue-inspect topic="<your.topic>" - is there a publisher, a binding to a queue, and a consumer on that queue?
  2. Missing binding? Check queue_topology.xml for the connection You actually use (amqp vs db)
  3. Consumer present but idle? system-status check="cron", consumers in many setups are started by cron
  4. Handler throws? diagnose-error source="exception" pattern="<HandlerClass>"

Building a new queue instead of debugging one:

  1. message-queue-inspect first, to see naming conventions and existing topics, so You do not collide
  2. Follow the _skill_hint to development-context category=message-queue, it walks through all four XML files
  3. Write the config, run setup:upgrade, then inspect Your topic again to confirm publisher, binding and consumer are all there

Start coding!

Source: GitHub · Introspection tools wiki