/data-messaging-skills:rabbitmq-configurationfrom data-messaging-skills
Designs RabbitMQ exchange/queue/binding topology, virtual host separation, and clustering for high availability. Guides exchange type selection, vhost isolation, and quorum vs mirrored queue decisions.
Ships in data-messaging-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
RabbitMQ's routing model — exchanges, queues, and the bindings between them — is where most of the design decisions that determine correctness and operability actually happen, more so than broker-level tuning. Choosing the wrong exchange type, skipping virtual host separation between unrelated applications, or clustering nodes without a clear quorum/mirroring strategy all produce problems that are hard to retrofit once producers and consumers are already built against the topology. This skill covers designing that topology and cluster deliberately — validating it before production rollout is covered separately in rabbitmq-configuration-validation.
vhost) separation between unrelated teams or
applications sharing a broker.rabbitmqctl/rabbitmq-diagnostics CLI (or the management HTTP
API) available for cluster and topology administration.rabbitmq-plugins enable rabbitmq_management) for visibility into
exchange/queue/binding state and cluster health during setup.Choose the exchange type based on the actual routing need, not habit. Direct exchanges route on an exact routing key match; topic exchanges route on wildcard patterns; fanout exchanges broadcast to every bound queue ignoring the routing key; headers exchanges route on message header attributes instead of the routing key:
rabbitmqadmin declare exchange name=orders.topic type=topic durable=true
rabbitmqadmin declare exchange name=orders.broadcast type=fanout durable=true
Use topic for anything needing pattern-based routing (e.g.
orders.created.us-east routed to a queue bound with
orders.created.*), fanout for broadcast-to-all-subscribers
patterns (e.g. cache invalidation events), and direct only when
routing keys are exact and finite (e.g. routing to one of a small,
fixed set of worker queues).
Declare durable queues bound with specific routing patterns, naming both the exchange and the binding intentionally so the topology is self-documenting:
rabbitmqadmin declare queue name=orders.fulfillment durable=true \
arguments='{"x-queue-type":"quorum"}'
rabbitmqadmin declare binding source=orders.topic destination=orders.fulfillment \
routing_key="orders.created.*"
durable=true on both the exchange and queue ensures the topology
itself survives a broker restart — it does not by itself make
individual messages survive a restart; that also requires messages to
be published as persistent (see step 3).
Publish messages as persistent for anything that must survive a broker restart, since queue durability and message persistence are separate settings:
channel.basic_publish(
exchange="orders.topic",
routing_key="orders.created.us-east",
body=message_body,
properties=pika.BasicProperties(delivery_mode=2), # 2 = persistent
)
A durable queue holding non-persistent (delivery_mode=1 or unset)
messages still loses those in-flight/unconsumed messages on a broker
restart — durability of the queue and persistence of its messages must
both be set for restart-survival.
Separate unrelated applications into distinct virtual hosts, each with its own access-scoped user, rather than sharing one vhost/ namespace across teams:
rabbitmqctl add_vhost orders-service
rabbitmqctl add_vhost notifications-service
rabbitmqctl set_permissions -p orders-service orders-app \
"^orders\." "^orders\." "^orders\."
The three permission patterns (configure, write, read) scoped to a
^orders\. prefix mean the orders-app user can only declare, write
to, and read from resources matching that naming convention within
its own vhost — a compromised or buggy orders-app credential can't
touch notifications-service's vhost at all, since vhosts are a hard
isolation boundary in RabbitMQ, not just a naming convention.
Choose quorum queues over classic mirrored queues for new high-availability queues. Quorum queues use Raft consensus for leader election and replication, giving more predictable failure behavior than classic mirroring's older synchronization model:
rabbitmqadmin declare queue name=orders.fulfillment durable=true \
arguments='{"x-queue-type":"quorum","x-quorum-initial-group-size":3}'
x-quorum-initial-group-size sets how many cluster nodes hold a
replica of this queue from creation — 3 is the common baseline,
matching the cluster's controller-node count, so the queue can
tolerate one node failure and still have a majority to elect a new
leader.
Cluster nodes and confirm the cluster's expected node count for quorum before relying on it for HA:
rabbitmqctl join_cluster rabbit@rmq-node-2
rabbitmqctl cluster_status
A 2-node cluster cannot achieve Raft majority if either node is down — quorum queues need at least 3 nodes to tolerate any single-node failure while remaining writable. Deploying quorum queues onto a 2-node cluster provides no real HA benefit over a single node for availability during a failure, only for data redundancy.
Set resource limits (memory/disk watermarks) deliberately rather than leaving broker-wide defaults unexamined, since RabbitMQ blocks publishers cluster-wide when a watermark is breached:
# rabbitmq.conf
vm_memory_high_watermark.relative = 0.6
disk_free_limit.absolute = 5GB
These are cluster-wide circuit breakers, not per-queue limits — a single misbehaving queue accumulating unconsumed messages can push the whole broker over the watermark and block publishing for every other queue on the same node, which is a strong argument for also setting per-queue length limits (see rabbitmq-configuration-validation).
x-queue-type: quorum rather than classic
mirrored queues for any new deployment on a supported RabbitMQ version.topic exchanges with a clear, hierarchical routing-key naming
convention (e.g. <domain>.<event>.<region>) rather than direct
exchanges with an ever-growing flat list of exact routing keys.delivery_mode=2 (persistent) as the default for any message whose
loss on broker restart would be a real problem, and treat non-persistent
publishing as an explicit, deliberate choice for genuinely disposable
data (e.g. ephemeral metrics), not a default left unset by omission.rabbitmqadmin/console clicks that can't
be diffed in review.Symptom: A message published to a durable queue is lost after a
broker restart, even though the queue itself still exists afterward.
Fix: Queue durability and message persistence are independent
settings — check whether the publisher set delivery_mode=2
(persistent). A durable queue with non-persistent messages loses any
message that was only in memory (not yet written to disk) at restart
time; fix the publisher's message properties, not the queue
declaration.
Symptom: A quorum queue deployed for HA still becomes unavailable
(no leader can be elected) when a single node goes down.
Fix: Check the cluster's actual node count and the queue's
x-quorum-initial-group-size — quorum queues need a majority of their
replica set alive to elect a leader. A 2-node cluster, or a
3-node cluster where the queue was created with a replica group size
of 1, has no real failure tolerance. Re-create (or grow) the queue's
replica set to span at least 3 nodes.
Symptom: A buggy consumer on one queue causes publishing to every
queue on the broker to block, not just the affected queue.
Fix: This is the cluster-wide memory or disk watermark being
breached by one queue's unconsumed backlog — RabbitMQ's flow control
blocks publishers broker-wide (or per-node), not per-queue, once a
watermark trips. Set a per-queue x-max-length or x-max-length-bytes
limit (with an appropriate overflow behavior — see
rabbitmq-configuration-validation)
so one queue's backlog can't consume unbounded broker memory/disk in
the first place, in addition to fixing the underlying consumer issue
(see
rabbitmq-queue-and-dead-letter-troubleshooting).
Symptom: Two unrelated teams' applications, sharing a single default vhost, start colliding — one team's queue-purge maintenance script accidentally matches and purges the other team's queue because both used similar naming. Fix: This is a direct consequence of skipping virtual host isolation. Separate the applications into distinct vhosts with permissions scoped by user, so name collisions across teams are structurally impossible rather than a naming-convention hope.
Scenario: A new orders-service needs a topic-exchange-based
routing setup with region-specific fulfillment queues, isolated from
every other team on a shared 3-node RabbitMQ cluster, with quorum queues
for HA.
Virtual host and scoped user:
rabbitmqctl add_vhost orders-service
rabbitmqctl add_user orders-app '<PLACEHOLDER_SET_VIA_SECRETS_MANAGER>'
rabbitmqctl set_permissions -p orders-service orders-app \
"^orders\." "^orders\." "^orders\."
Topology declared against the orders-service vhost:
rabbitmqadmin -V orders-service declare exchange \
name=orders.topic type=topic durable=true
rabbitmqadmin -V orders-service declare queue \
name=orders.fulfillment.us-east durable=true \
arguments='{"x-queue-type":"quorum","x-quorum-initial-group-size":3}'
rabbitmqadmin -V orders-service declare queue \
name=orders.fulfillment.eu-west durable=true \
arguments='{"x-queue-type":"quorum","x-quorum-initial-group-size":3}'
rabbitmqadmin -V orders-service declare binding \
source=orders.topic destination=orders.fulfillment.us-east \
routing_key="orders.created.us-east"
rabbitmqadmin -V orders-service declare binding \
source=orders.topic destination=orders.fulfillment.eu-west \
routing_key="orders.created.eu-west"
Publisher (persistent messages, routed by region):
channel.basic_publish(
exchange="orders.topic",
routing_key="orders.created.us-east",
body=order_payload,
properties=pika.BasicProperties(delivery_mode=2, content_type="application/json"),
)
Because the cluster has 3 nodes and each quorum queue's initial group
size is 3, either orders.fulfillment.us-east or
orders.fulfillment.eu-west continues accepting messages and electing a
leader if any single node fails, and because the orders-app user's
permissions are scoped to the ^orders\. prefix within its own
orders-service vhost, no other team's queues are reachable with these
credentials even if they were somehow leaked.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin data-messaging-skills13 skills in this plugin
/airflow-dag-authoring-and-validationAuthors Apache Airflow DAGs — task dependencies, operator choice, sensors, idempotency — and validates them with `airflow dags test`, import-time checks, and DAG linting before they reach a production scheduler. Use when the user asks to "write an Airflow DAG," "add a task dependency," "use a sensor to wait for a file/table," "validate a DAG before deploying it," "lint an Airflow DAG," or reviews a DAG file for correctness before merge.
/airflow-scheduler-and-dag-troubleshootingDiagnoses a stuck or failed Airflow DAG run, scheduler-health problems (slow parsing, stuck queued tasks), and plans safe task-retry/backfill strategy. Use when the user reports "Airflow DAG is stuck," "task stuck in queued state," "scheduler seems unhealthy," "DAG run failed and I need to retry it," "should I backfill this DAG," or asks to troubleshoot a live Airflow production incident.
/dagster-and-prefect-pipeline-authoringAuthors data pipelines with Dagster's asset-based model or Prefect's Pythonic flow/task model as modern alternatives to Airflow, and gives a decision framework for when each fits better than task-based DAG orchestration. Use when the user asks to "write a Dagster asset," "define a Prefect flow," "should we use Dagster instead of Airflow," "asset-based vs. task-based orchestration," or is evaluating a data-orchestration tool for a new pipeline.
/kafka-cluster-configurationDesigns Apache Kafka broker configuration, topic/partition layout, replication factor, and cluster metadata mode (ZooKeeper vs. KRaft). Use when the user asks to "size a Kafka cluster," "set replication factor," "design topic partitions," "configure Kafka brokers," "migrate from ZooKeeper to KRaft," or "set up a new Kafka cluster" from scratch.
/kafka-configuration-validationValidates Kafka topic configuration (retention, cleanup policy, replication, min.insync.replicas) and consumer group settings before a production rollout. Use when the user asks to "review a Kafka topic config before deploying," "validate retention/compaction settings," "check consumer group config for a new service," or "audit Kafka topics for production readiness" prior to go-live.
/kafka-consumer-lag-and-partition-troubleshootingDiagnoses growing Kafka consumer lag, rebalance storms, and under-replicated partitions in a running cluster. Use when the user reports "consumer lag keeps growing," "consumer group stuck rebalancing," "under-replicated partitions," "Kafka consumers keep dropping out of the group," or asks to troubleshoot a Kafka production incident involving lag or partition health.
Other plugins' skills for the same job