github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

famoseagle / carrot

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 93
    • 7
  • Source
  • Commits
  • Network (7)
  • Issues (1)
  • Downloads (7)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (7)
    • v0.7.0
    • v0.6.0
    • v0.5.0
    • v0.4.0
    • v0.3.0
    • v0.2.0
    • v0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A synchronous amqp client — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

returning nil counts when the amqp connection is already closed 
famoseagle (author)
Sun Jan 03 09:03:35 -0800 2010
commit  951d03ce7f959c1304fc534b0cfb1386043c2aa1
tree    7b03ee690eac9eb9a63a26fc33f930afe06b907f
parent  7c0ee7f9f60e0bd670d1610a4ab3e6d7214c775e
carrot /
name age
history
message
file .gitignore Fri Mar 20 17:23:39 -0700 2009 Initial commit to carrot. [famoseagle]
file LICENSE Wed Apr 08 16:01:05 -0700 2009 adding examples and readme [famoseagle]
file README.markdown Thu Apr 23 19:33:10 -0700 2009 more README changes [famoseagle]
file Rakefile Mon Oct 19 14:55:12 -0700 2009 Pushing carrot to gemcutter [famoseagle]
file VERSION.yml Wed Aug 26 12:06:47 -0700 2009 Version bump to 0.7.0 [famoseagle]
file carrot.gemspec Mon Oct 19 14:55:12 -0700 2009 Pushing carrot to gemcutter [famoseagle]
directory lib/ Sun Jan 03 09:03:35 -0800 2010 returning nil counts when the amqp connection i... [famoseagle]
directory protocol/ Fri Mar 20 17:25:14 -0700 2009 adding aman's amqp code [famoseagle]
directory test/ Wed Aug 26 12:03:05 -0700 2009 fixed 'unexpected length' exceptions when handl... [famoseagle]
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

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server