README.markdown in bunny-0.1.0 vs README.markdown in bunny-0.1.1
- old
+ new
@@ -2,34 +2,27 @@
Google Group: [bunny-amqp](http://groups.google.com/group/bunny-amqp)
Mailing List: [bunny-amqp-devel](http://rubyforge.org/mailman/listinfo/bunny-amqp-devel)
-Rubyforge: [bunny-amqp](http://bunny-amqp.rubyforge.org)
+Rubyforge: [bunny-amqp](http://rubyforge.org/projects/bunny-amqp)
## Announcements
-**IMPORTANT**
+Bunny v0.1.1 has been released. It contains the following changes -
-The Exchange#initialize method arguments have changed as of version 0.0.7
+* Queue#delete method returns ‘QUEUE DELETED’, Exchange#delete method returns ‘EXCHANGE DELETED’, Queue#bind returns ‘BIND SUCCEEDED’, Queue#unbind returns ‘UNBIND SUCCEEDED’
+* Queue#subscribe method available (see example bunny/examples/simple_consumer.rb)
+* Queue#status now returns a hash {:message_count, :consumer_count}
+* Queue#ack works after a Queue#subscribe or Queue#pop if :ack => true was specified
-You now create an exchange like this -
-
- b = Bunny.new
- exch = b.exchange('my_exchange', :type => :fanout)
-
-If you do not specify a :type option then a default of :direct is used.
-
-The old way was -
-
- b = Bunny.new
- exch = b.exchange(:fanout, 'my_exchange')
-
## About
*Bunny* is an [AMQP](http://www.amqp.org) (Advanced Message Queuing Protocol) client, written in Ruby, that is intended to allow you to interact with AMQP-compliant message brokers/servers such as [RabbitMQ](http://www.rabbitmq.com) in a synchronous fashion.
+It is based on a great deal of fabulous code from [amqp](http://github.com/tmm1/amqp) by Aman Gupta and [Carrot](http://github.com/famoseagle/carrot) by Amos Elliston.
+
You can use *Bunny* to -
* Create and delete exchanges
* Create and delete queues
* Publish and consume messages
@@ -41,16 +34,11 @@
require 'bunny'
b = Bunny.new(:logging => true)
# start a communication session with the amqp server
- begin
- b.start
- rescue Exception => e
- puts 'ERROR - Could not start a session: ' + e
- exit
- end
+ b.start
# declare a queue
q = b.queue('test1')
# publish a message to the queue
@@ -108,14 +96,17 @@
Queue#message_count
### Return queue consumer count
Queue#consumer_count
-### Return queue status (array of message count and consumer_count)
+### Return queue status (hash {:message count, :consumer_count})
Queue#status
### Delete a queue from the target server
Queue#delete({_options_})
+
+### Acknowledge receipt of a message
+Queue#ack
## Acknowledgements
This project has borrowed heavily from the following two projects and owes their respective creators and collaborators a whole lot of gratitude: