Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 38 lines (23 sloc) 0.952 kb
93c74ce @edsrzf Add README
edsrzf authored
1 IronMQ Java Client
2 ----------------
3
4 Getting Started
5 ===============
6
e31e97d @treeder Added link to downloads.
treeder authored
7 [Download the IronMQ jar](https://github.com/iron-io/iron_mq_java/downloads).
8 Or build from source with [Apache Buildr](http://buildr.apache.org):
93c74ce @edsrzf Add README
edsrzf authored
9
10 buildr package
11
12 The .jar file will appear under the target directory.
13
8f13402 @edsrzf Correct link to API documentation
edsrzf authored
14 The API is documented [here](http://iron-io.github.com/iron_mq_java/).
93c74ce @edsrzf Add README
edsrzf authored
15
16 The Basics
17 ==========
18 **Initialize** a client and get a queue object:
19
81a1aeb @edsrzf Add support for clouds
edsrzf authored
20 Client client = new Client("my project", "my token", Cloud.IronAWSUSEast);
54df599 @iced Moving to https & small cleanup
iced authored
21 Queue queue = client.queue("my_queue");
93c74ce @edsrzf Add README
edsrzf authored
22
23 **Push** a message on the queue:
24
25 queue.Push("Hello, world!");
26
27 **Pop** a message off the queue:
28
29 Message msg = queue.get();
30
31 When you pop/get a message from the queue, it will *not* be deleted. It will
32 eventually go back onto the queue after a timeout if you don't delete it. (The
397826a @edsrzf Correct default timeout
edsrzf authored
33 default timeout is 60 seconds.)
93c74ce @edsrzf Add README
edsrzf authored
34
35 **Delete** a message from the queue:
36
37 queue.deleteMessage(msg);
Something went wrong with that request. Please try again.