rabbitmq-rails

Configure durable RabbitMQ exchanges and sneakers consumers in Rails.

21|2|Updated May 24, 2026
One-click install
npx skills add https://github.com/sandeepmvl/rails-skills --skill rabbitmq-rails
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rabbitmq-rails
Source: https://github.com/sandeepmvl/rails-skills/tree/main/skills/44-rabbitmq-rails
Command: npx skills add https://github.com/sandeepmvl/rails-skills --skill rabbitmq-rails

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the common pitfalls of implementing RabbitMQ in Rails applications, preventing data loss from missing durability settings, fragile routing from incorrect exchange topology, and wasted effort from choosing the wrong messaging tool for the job.

Core Features & Use Cases

  • Correct tooling & setup: Guides use of the bunny gem for synchronous publishing and sneakers for long-running Rails-integrated consumer workers, with proper connection management and initializer configuration.
  • Resilient messaging patterns: Covers durable exchanges and queues, persistent messages, manual acknowledgements to avoid data loss on crashes, dead-letter exchanges for failed message handling, and the outbox pattern to decouple transactions from broker availability.
  • Optimization & tool selection: Teaches exchange topology configuration (direct, topic, fanout, headers) for complex routing, prefetch tuning for consumer performance, and clear guidance on when to use RabbitMQ versus Kafka, Solid Queue, or Redis Streams.
  • Use Case: For example, if you need to distribute order processing work across Ruby, Python, and Go workers with flexible routing rules, this Skill ensures you build a fault-tolerant system that survives broker restarts and worker failures.

Quick Start

Use the rabbitmq-rails skill to set up a durable RabbitMQ topic exchange for order events with sneakers consumers that use manual acknowledgements and dead-letter handling for failed messages.

Frequently Asked Questions about rabbitmq-rails

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

FAQPage Schema
How do I prevent data loss when publishing RabbitMQ messages in Rails?

To prevent data loss in Rails RabbitMQ integrations, use durable exchanges, persistent messages, and manual acknowledgements. Implementing the outbox pattern further decouples database transactions from broker availability, ensuring reliable message delivery during crashes.

How do I set up RabbitMQ consumers in Rails using sneakers?

Set up Rails RabbitMQ consumers with sneakers by configuring long-running worker processes that integrate with the Rails environment. Use manual acknowledgements and configure dead-letter exchanges to handle failed messages, ensuring resilient consumer processing without data loss.

When should I use RabbitMQ instead of Kafka or Redis Streams in Rails?

Choose RabbitMQ over Kafka or Redis Streams when you need complex routing rules across polyglot workers. RabbitMQ excels with flexible exchange topologies like direct, topic, and fanout, whereas Kafka suits high-volume event streaming and Redis fits simpler queueing.

What is the best way to handle failed RabbitMQ messages in a Rails application?

The best way to handle failed RabbitMQ messages in Rails is by configuring a dead-letter exchange. Route messages that fail consumer processing to this dedicated exchange, preventing data loss and allowing separate inspection or reprocessing of failed events.

How do I tune RabbitMQ prefetch limits for Rails sneakers workers?

Tune RabbitMQ prefetch limits for Rails sneakers workers by adjusting the consumer prefetch QoS setting. Optimizing this value balances consumer throughput and memory usage, preventing workers from being overwhelmed by too many unacknowledged messages simultaneously.

Does the outbox pattern work with Rails and RabbitMQ?

Yes, the outbox pattern works with Rails and RabbitMQ by decoupling database transactions from broker availability. It reliably publishes AMQP messages by storing them in the database first, ensuring messages survive application or broker crashes.