Skip to content
This repository

Ruby library for IronMQ.

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION.yml
Octocat-spinner-32 iron_mq.gemspec

IronMQ Ruby Client

Getting Started

Install the gem:

gem install iron_mq

Create an IronMQ client object:

@ironmq ='token'=>'MYTOKEN', 'project_id'=>'MYPROJECTID')

You can get your token and project_id at .

The Basics

Push a message on the queue:

msg ="hello world!")
p msg

Pop a message off the queue:

msg = @ironmq.messages.get()
p msg

When you pop/get a message from the queue, it will NOT be deleted. It will eventually go back onto the queue after a timeout if you don't delete it (default timeout is 10 minutes).

Delete a message from the queue:

res = msg.delete # or @ironmq.messages.delete(msg["id"])
p res

Delete a message from the queue when you're done with it.

Queue Selection

One of the following:

  1. Pass :queue_name=>'my_queue' into
  2. @client.queue_name = 'my_queue'
  3. Pass :queue_name=>'my_queue' into any post(), get(), or delete()

Queue Information

queue = @client.queues.get(:name=>@client.queue_name)
puts "size: #{queue.size}"
Something went wrong with that request. Please try again.