Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 cloud.go
Octocat-spinner-32 ironmq.go
Octocat-spinner-32 ironmq_test.go
README.md

DEPRECATED! Please use https://github.com/iron-io/iron_go

IronMQ Go Client

Getting Started

Install the package:

go get github.com/iron-io/iron_mq_go

The API is documented here.

The Basics

Initialize a client and get a queue object:

client := ironmq.NewClient("my project", "my token", ironmq.IronAWSUSEast)
queue := client.Queue("my_queue")

Push a message on the queue:

id, err := queue.Push("Hello, world!")

Pop a message off the queue:

msg, err := queue.Get()

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. (The default timeout is 10 minutes.)

Delete a message from the queue:

err := msg.Delete()

Switching Clouds

You can switch to Rackspace by changing the Cloud/Region when creating the client.

client := ironmq.NewClient("my project", "my token", ironmq.IronRackspaceORD)

See cloud.go for full list.

Something went wrong with that request. Please try again.