C# Class IronIO.IronMQ

Iron.io Message Queue API
Mostra file Open project: odeits/IronTools

Public Methods

Method Description
Clear ( ) : void

Clears a Queue regardless of message status

Count ( ) : int

Gets the size of the queue

Delete ( Message msg ) : void

Delete a message from the queue

Delete ( string id ) : void

Delete a message from the queue

Get ( int max ) : IList

Retrieves up to "max" messages from the queue

Get ( ) : Message

Retrieves up to "max" messages from the queue

IronMQ ( string name, string projectId = null, string token = null ) : System

Initializes a new instance of the IronMQ class.

Push ( IEnumerable msgs, long timeout, long delay, long expires_in ) : void

Pushes messages onto the queue with an optional timeout

Push ( string msg, long timeout ) : void

Pushes a message onto the queue with a timeout

Queues ( string projectId = null, string token = null, int page, int perPage = 30 ) : IList

Get a list of all queues in a project. By default, 30 queues are listed at a time. To see more, use the page parameter or the per_page parameter. Up to 100 queues may be listed on a single page.

Method Details

Clear() public method

Clears a Queue regardless of message status
Thrown if the IronMQ service returns a status other than 200 OK. Thrown if there is an error accessing the IronMQ server.
public Clear ( ) : void
return void

Count() public method

Gets the size of the queue
public Count ( ) : int
return int

Delete() public method

Delete a message from the queue
Thrown if the IronMQ service returns a status other than 200 OK. Thrown if there is an error accessing the IronMQ server.
public Delete ( Message msg ) : void
msg IronIO.Data.Message Message to be deleted
return void

Delete() public method

Delete a message from the queue
Thrown if the IronMQ service returns a status other than 200 OK. Thrown if there is an error accessing the IronMQ server.
public Delete ( string id ) : void
id string Message Identifier
return void

Get() public method

Retrieves up to "max" messages from the queue
Thrown if the IronMQ service returns a status other than 200 OK. Thrown if there is an error accessing the IronMQ server.
public Get ( int max ) : IList
max int the count of messages to return, default is 1
return IList

Get() public method

Retrieves up to "max" messages from the queue
Thrown if the IronMQ service returns a status other than 200 OK. Thrown if there is an error accessing the IronMQ server.
public Get ( ) : Message
return IronIO.Data.Message

IronMQ() public method

Initializes a new instance of the IronMQ class.
public IronMQ ( string name, string projectId = null, string token = null ) : System
name string Queue name
projectId string Project identifier available from the HUD
token string Token available from the HUD
return System

Push() public method

Pushes messages onto the queue with an optional timeout
Thrown if the IronMQ service returns a status other than 200 OK. Thrown if there is an error accessing the IronMQ server.
public Push ( IEnumerable msgs, long timeout, long delay, long expires_in ) : void
msgs IEnumerable Messages to be pushed
timeout long The timeout of the messages to push.
delay long Delay in seconds
expires_in long Expires in seconds
return void

Push() public method

Pushes a message onto the queue with a timeout
Thrown if the IronMQ service returns a status other than 200 OK. Thrown if there is an error accessing the IronMQ server.
public Push ( string msg, long timeout ) : void
msg string Message to be pushed.
timeout long The timeout of the message to push.
return void

Queues() public static method

Get a list of all queues in a project. By default, 30 queues are listed at a time. To see more, use the page parameter or the per_page parameter. Up to 100 queues may be listed on a single page.
public static Queues ( string projectId = null, string token = null, int page, int perPage = 30 ) : IList
projectId string Project identifier available from the HUD
token string Token available from the HUD
page int Page index (zero based)
perPage int Number of results per page
return IList