x-queue-rabbitmq

Design RabbitMQ retry and DLQ topology using Definitions and x-death semantics.

2|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/pure-golang/level85 --skill x-queue-rabbitmq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: x-queue-rabbitmq
Source: https://github.com/pure-golang/level85/tree/main/.agents/skills/x-queue-rabbitmq
Command: npx skills add https://github.com/pure-golang/level85 --skill x-queue-rabbitmq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents brittle queue retry and DLQ behavior by giving a consistent RabbitMQ topology pattern that makes publisher/subscriber failures recoverable and predictable.

Core Features & Use Cases

  • Topology-first reliability: Use Definitions to define exchanges, queues, bindings, and retry/DLQ topology in a stable, reusable way.
  • Correct retry semantics via x-death: Implement retry based on errors and RabbitMQ x-death state, routing messages to retry until MaxRetries is reached, then to DLQ.
  • Pragmatic integration patterns: Prefer NewPublisher2 and NewSubscriber2, and use MultiQueueSubscriber when you need fan-in consumption from multiple queues without parallelism across queues.
  • Use Case: You ship an event-driven service where handlers intermittently fail; this Skill helps you design retry queues, DLQ routing, and the deployment-safe topology so failed messages don’t get lost or loop forever.

Quick Start

Apply this skill when designing a RabbitMQ publisher/subscriber pair and specify retry and DLQ behavior through Definitions, then implement the subscriber using NewSubscriber2 with MaxRetries and the retry queue wired back to the main exchange/queue.

Frequently Asked Questions about x-queue-rabbitmq

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a RabbitMQ retry and DLQ topology that prevents infinite message loops?

A RabbitMQ retry and DLQ topology prevents infinite loops by using x-death semantics to track retry counts, routing messages to retry queues until MaxRetries is reached, then forwarding to the DLQ. Stable Definitions for exchanges, queues, and bindings make this behavior predictable and deployment-safe.

How do I handle publisher failures using RabbitMQ publisher confirms in Go?

RabbitMQ publisher confirms in Go are configured using NewPublisher2 to ensure messages are reliably delivered. This Skill designs the publisher/subscriber retry behavior by combining confirms with stable topology Definitions, making publisher failures recoverable without losing messages.

What is the correct way to trigger a RabbitMQ retry using x-death headers?

RabbitMQ retry via x-death headers is triggered only when an error is present during subscriber processing and the x-death state indicates retries are below MaxRetries. The subscriber uses Nack with correct requeue behavior to route the message to the retry queue instead of looping it back to the main queue.

Can I consume messages from multiple RabbitMQ queues without parallelism using Go?

Consuming messages from multiple RabbitMQ queues without parallelism across queues in Go is supported using the MultiQueueSubscriber pattern. This Skill integrates MultiQueueSubscriber with NewSubscriber2 and routing-key based messaging to enable fan-in consumption while maintaining consistent retry and DLQ semantics.

Why are my RabbitMQ messages getting lost or reprocessed immediately after a subscriber error?

RabbitMQ messages get lost or reprocessed immediately when the retry topology is brittle or Nack requeue behavior is incorrect. This Skill solves the problem by defining retry and DLQ queues via stable Definitions, ensuring the subscriber triggers retries based on x-death state and error presence until MaxRetries is reached.