Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
IronMQ Java Client | ||
---------------- | ||
|
||
Getting Started | ||
=============== | ||
|
||
**Import** IronMQ client package: | ||
|
||
import io.iron.ironmq.*; | ||
|
||
**Initialize** a client and get a queue object: | ||
|
||
client = new Client("my project", "my token"); | ||
queue = client.queue("my_queue"); | ||
|
||
**Push** a message on the queue: | ||
|
||
queue.Push("Hello, world!"); | ||
|
||
**Pop** a message off the queue: | ||
|
||
msg = 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: | ||
|
||
queue.deleteMessage(msg); |