Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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