[rabbitmq-discuss] AMQP, Bunny and Carrot Gems

Mark static.void.dev at gmail.com
Mon Jan 23 17:46:24 GMT 2012

Thanks for the insight. From the gist of it it sounds like there really 
isn't a good reason to use any of those other gems.

As for your example can't you skip the asynchronous "complexity" by 
simply using a block?

channel.queue("", :auto_delete => true, :exclusive => true) do |queue, 
     puts "Broker generated name: #{queue.name}"


On 1/23/12 8:28 AM, Michael Klishin wrote:
> StaticVoid:
>> Sorry for my ignorance but can someone please explain why someone
>> would use the Bunny or Carrot synchronous gems over the standard Ruby-
>> AMQP gem?
> Simplicity. Some people, especially in the Ruby community, value "the simplest thing out there"
> more than anything else. In some cases, that's a good reason.
> For example, even though amqp gem lets you write pseudo synchronous code like
> q = ch.queue("", :auto_delete =>  true)
> # for this method to work, we need to know queue name
> # but it is server-generated and will be assigned asynchronously.
> # so consumer registration is delayed until after we know the name.
> q.subscribe(&method(:handle_reply))
> it is not synchronous and in some rare cases, this has to be taken into account. Some developers
> find this "too complex" and will ignore all the features, documentation guides, performance and error handling/recovery
> support amqp gem offers just because using it requires some basic understanding of how
> asynchronous libraries work and what downsides they have.
> Another reason may be that amqp gem 0.8.0 and later version requires RabbitMQ 2.0+. Tools like
> Chef want to support stock rabbitmq versions in ubuntu and debian repositories and that often means
> 1.7.x versions.
>> Is it more safe because the call to the broker is blocked
>> until it receives a response while as the ruby-amqp could fail? How
>> much of a performance penalty is there for using amqp synchronously.
>> Typically which is used more... Carrot or Bunny and why?
>> Thanks for the input
> Definitely Bunny. Bunny is not actively maintained at the moment but I haven't met
> a single Carrot user in over a year.
> MK

More information about the rabbitmq-discuss mailing list