agentleFS
seed-forgeseed-forge/harness-ai-kit/skills/public-rabbitmq-expert-base/SKILL.md

public-rabbitmq-expert-base

Skill25 starsChanged 4 months agoApache-2.0View on GitHub

RabbitMQ 知识基座。覆盖 Exchange Types、Queue & Routing、Durability、Dead Letter、Confirmations。供 devlab-rabbitmq-usage 通过 extends 继承。

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default exchange (empty name): direct routing by queue name.

    line 18
  2. Distinctive:

    Always declare exchanges explicitly.

    line 19
  3. Very specific:

    Use x-message-ttl for message expiration.

    line 24
  4. Very specific:

    Use x-max-length to cap queue size (drop or dead-letter oldest).

    line 25
  5. Very specific:

    Never use auto_ack=true in production (message loss on consumer crash).

    line 32
  6. Distinctive:

    Use DLX for retry queues, error handling, and audit trails.

    line 37
  7. Distinctive:

    Use connection pooling for multi-threaded applications.

    line 43
  8. Distinctive:

    Always use publisher confirms and consumer acknowledgments.

    line 53
  9. Very specific:

    Never use auto_ack=true in production.

    line 54
  10. Distinctive:

    Always declare queues and exchanges explicitly.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

RabbitMQ Knowledge Base

Source: Adapted from mindrally/skills (rabbitmq-development) and RabbitMQ official documentation.

Exchange Types

TypeRoutingUse for
DirectExact routing key matchPoint-to-point, RPC
TopicWildcard pattern (*.info, #)Flexible pub/sub
FanoutIgnore routing key, broadcast to all bound queuesBroadcast notifications
HeadersMatch on message headers (not routing key)Complex routing rules
  • Default exchange (empty name): direct routing by queue name. Convenient but not recommended for production.
  • Always declare exchanges explicitly; don't rely on auto-created exchanges.

Queue & Routing

  • Declare queues with durable=true for persistence across broker restarts.
  • Bind queues to exchanges with routing keys.
  • Use x-message-ttl for message expiration.
  • Use x-max-length to cap queue size (drop or dead-letter oldest).
  • Prefetch count (basic_qos): limit unacknowledged messages per consumer.

Durability & Reliability

  • durable=true on queue + persistent delivery mode on message = survive broker restart.
  • Publisher confirms: confirm_select() → broker acknowledges message receipt.
  • Consumer acknowledgments: basic_ack (success) / basic_nack (failure, requeue or dead-letter).
  • Never use auto_ack=true in production (message loss on consumer crash).

Dead Letter Exchange (DLX)

  • Messages are dead-lettered when: rejected (basic_nack with requeue=false), TTL expired, or queue length exceeded.
  • Configure with x-dead-letter-exchange and x-dead-letter-routing-key on the source queue.
  • Use DLX for retry queues, error handling, and audit trails.
  • Pattern: main queue → DLX → retry queue (with TTL) → main queue.

Connection & Channel

  • One connection per application; multiple channels per connection.
  • Channels are lightweight; connections are expensive (TCP + AMQP handshake).
  • Use connection pooling for multi-threaded applications.
  • Set heartbeat interval (default 60s) to detect dead connections.

Common Patterns

  • Work queue: multiple consumers, round-robin dispatch, prefetch=1 for fair dispatch.
  • Pub/Sub: fanout exchange, each subscriber has own queue.
  • RPC: direct exchange, correlation_id + reply_to for request/response.
  • Delay/Retry: DLX + TTL queue for delayed message processing.

Guardrails

  • Always use publisher confirms and consumer acknowledgments.
  • Never use auto_ack=true in production.
  • Always declare queues and exchanges explicitly.
  • Set prefetch count to prevent consumer overload.
  • Monitor queue depth and consumer lag.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.