This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
carrot /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Mar 20 17:23:39 -0700 2009 | |
| |
LICENSE | Wed Apr 08 16:01:05 -0700 2009 | |
| |
README.markdown | Thu Apr 23 19:33:10 -0700 2009 | |
| |
Rakefile | Mon Oct 19 14:55:12 -0700 2009 | |
| |
VERSION.yml | Wed Aug 26 12:06:47 -0700 2009 | |
| |
carrot.gemspec | Mon Oct 19 14:55:12 -0700 2009 | |
| |
lib/ | Wed Aug 26 12:03:05 -0700 2009 | |
| |
protocol/ | Fri Mar 20 17:25:14 -0700 2009 | |
| |
test/ | Wed Aug 26 12:03:05 -0700 2009 |
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







