REQUIREMENTS

DESCRIPTION

IO::Iron::IronMQ is a client for the IronMQ message queue at http://www.iron.io/. IronMQ is a cloud based message queue with a REST API. IO::Iron::IronMQ creates a Perl object for interacting with IronMQ. All IronMQ functions are available.

IronMQ Message Queue

IronMQ is a message queue as a service available to Internet connecting applications via its REST interface. Built with distributed cloud applications in mind, it provides on-demand message queuing with HTTPS transport, one-time FIFO delivery, message persistence, and cloud-optimized performance. [see http://www.iron.io/]

Using the IronMQ Client Library

IO::Iron::IronMQ::Client is a normal Perl package meant to be used as an object.

IO::Iron::IronMQ::Queue objects are created by the client IO::Iron::IronMQ::Client. With an IO::Iron::IronMQ::Queue object you can push messages to the queue, or pull messages from it. The names push and pull are used because the queue is likened to a pipe. The queue is like a FIFO pipe (first in, first out).

Get queue name.

my $queue_name = $iron_mq_queue->name();

Add one or more messages to the queue. Returns the ids of the messages sent or the number of sent messages.

Read one or more messages from the queue and reserve them so another process cannot access them. Parameters: n (number of messages you want, default 1, maximum 100; if there is less, all available messages will be returned), if no messages, an empty list will be returned, timeout (After timeout (in seconds), item will be placed back onto queue, default is 60 seconds, minimum is 30 seconds, and maximum is 86,400 seconds (24 hours)).

Read one or more messages from the queue but don't reserve them. Parameters: n (number of messages you want, default 1, maximum 100; if there is less, all available messages will be returned), if no messages, an empty list will be returned.

my @iron_mq_msg_peeks = $iron_mq_queue->peek( n => 10 );

Delete one or more messages from the queue. Call this when you have processed the messages. Returns the ids of the messages deleted or the number of deleted messages.

Release one or more messages back to the queue. Releasing a reserved message unreserves the message and puts it back on the queue as if the message had timed out. Delay: The item will not be available on the queue until this many seconds have passed. Default is 0 seconds. Maximum is 604,800 seconds (7 days).

Clear all messages from the queue: delete all messages, whether they are reserved or not.

my $cleared = $iron_mq_queue->clear_messages();

Get queue size.

my $size = $iron_mq_queue->size();

Push Queue Commands

Get push status for a message. Retrieve the push status for a particular message which will let you know which subscribers have received the message, which have failed, how many times it's tried to be delivered and the status code returned from the endpoint.

Exceptions

A REST call to IronMQ server may fail for several reason. All failures generate an exception using the Exception::Class package. Class IronHTTPCallException contains the field status_code, response_message and error. Error is formatted as such: IronHTTPCallException: status_code=<HTTP status code> response_message=<response_message>.

list_queues

Return a list of queue names.

Paginated with per_page and previous (this is the last queue on the previous page, it will start from the next one. If queue with specified name doesn’t exist result will contain first per_page queues that lexicographically greater than previous).

Message Var Default Maximum Notes Message Size -- 64KB Includes the entire request (delay, timeout, expiration). Delay 0sec 604,800sec Message is made available on queue after the delay expires. Timeout 60sec 86,400sec Message goes back on queue after timeout unless deleted. Expiration 604,800sec 2,592,000sec Equates to 7 days and 30 days, respectively. Messages per Get 1 100 One or more messages can be handled at a time.

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 802:

Non-ASCII character seen before =encoding in 'doesn’t'. Assuming UTF-8

Around line 900:

Expected text after =item, not a number

Around line 1051:

Expected text after =item, not a number

Module Install Instructions

To install IO::Iron::IronMQ::Client, simply copy and paste either of the commands in to your terminal

As a valued partner and proud supporter of MetaCPAN, StickerYou is
happy to offer a 10% discount on all Custom Stickers,
Business Labels, Roll Labels,
Vinyl Lettering or Custom Decals. StickerYou.com
is your one-stop shop to make your business stick.
Use code METACPAN10 at checkout to apply your discount.