---
name: "rabbitmq-consistent-hash-exchange"
description: "Distribute messages evenly across worker queues and handle processing failures with DLX."
metadata:
  author: "RabbitMQ"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "configure rabbitmq dlx"
  - "setup consistent hash exchange rabbitmq"
  - "enable rabbitmq publisher confirms"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# RabbitMQ Consistent Hash Exchange & Dead Lettering

Configures RabbitMQ messaging topologies: consistent-hash exchanges for ordered partition distribution, dead-letter exchanges (DLX) with x-dead-letter-routing-key, message TTL, and publisher confirms.

## When to Invoke
Invoke this skill whenever you need to:
- configure rabbitmq dlx
- setup consistent hash exchange rabbitmq
- enable rabbitmq publisher confirms

## Execution SOP & Rules
1. Enable rabbitmq_consistent_hash_exchange plugin: rabbitmq-plugins enable rabbitmq_consistent_hash_exchange.
2. Declare exchange with type x-consistent-hash and bind multiple worker queues with integer weights.
3. Configure queue arguments: {'x-dead-letter-exchange': 'retry_dlx', 'x-message-ttl': 60000}.
4. Enable channel.confirm_delivery() on publishing channels and await ack callbacks.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
