Sha256: cf0024356b8bb2f00af715b4c99854f29d50c0e331e56fe3dc75ee8a5e1f6639
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
# MessageQueue A common interface to multiple message queues libraries. ## Installation Add this line to your application's Gemfile: gem 'message_queue' And then execute: $ bundle Or install it yourself as: $ gem install message_queue ## Usage ```ruby MessageQueue.with_connection(:adapter => :bunny, :serializer => :message_pack) do |conn| publisher = conn.new_publisher( :exchange => { :name => "time", :type => :topic }, :message => { :routing_key => "time.now" } ) consumer = conn.new_consumer( :queue => { :name => "print_time_now" }, :exchange => { :name => "time", :routing_key => "time.#" } ) consumer.subscribe do |delivery_info, metadata, payload| puts "Received message: #{payload}" end publisher.publish Time.now.to_s sleep 1 end ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
message_queue-0.0.2 | README.md |