Skip to content
Nimbul is a Cloud Manager developed by The New York Times's Infrastructure and Automation Group
Ruby JavaScript Shell
Find file
Pull request Compare This branch is 739 commits ahead, 5 commits behind vadimj:master.
Latest commit 695cad7 Mar 25, 2013 Chris DiMartino Pull activemessaging from our repo
Failed to load latest commit information.
.bundle
app
bin
config
db
doc
features/support
lib
log
protocol
public
script
spec cleaning up bad unit tests and specs so we can get some real code cov… Sep 15, 2010
stories
test
vendor
.gitignore
.rvmrc
AUTHORS
COPYING
CREDITS
Gemfile
Gemfile.lock
INSTALL
LICENSE
README
README.markdown
README.restful_authentication
Rakefile
TODO
VERSION
VERSION.yml
carrot.gemspec
emissary-update.erb
gediturl
restart
start
stop
tags

README.markdown

Carrot

A synchronous amqp client. Based on Aman's amqp client:

http://github.com/tmm1/amqp/tree/master

Motivation

This client does not use eventmachine so no background thread necessary. As a result, it is much easier to use from script/console and Passenger. It also solves the problem of buffering messages and ack responses. For more details see this thread.

There is currently no way to prevent buffering using eventmachine. Support for prefetch is still unreliable.

Example

require 'carrot'

q = Carrot.queue('name')
10.times do |num|
  q.publish(num.to_s)
end

puts "Queued #{q.message_count} messages"
puts

while msg = q.pop(:ack => true)
  puts "Popping: #{msg}"
  q.ack
end
Carrot.stop

LICENSE

Copyright (c) 2009 Amos Elliston, Geni.com; Published under The MIT License, see License

Something went wrong with that request. Please try again.