C# SQS Query API Version 2008-01-01

Sample Code & Libraries>.NET>C# SQS Query API Version 2008 01 01
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

An open-source collection of helper and response classes written in c# for Amazon Web Services Simple Queue Services. Uses Query API version 2008-01-01.

Details

Submitted By: James Groat
AWS Products Used: Amazon SQS
Language(s): C#, VB.NET
License: Apache License 2.0
Created On: February 27, 2008 8:53 PM GMT
Last Updated: September 21, 2008 8:35 PM GMT
Download

About

Groat.AWS.SQS is a collection of helper and response classes written in c# for Amazon Web Services Simple Queue Services.
  • Uses Query API version 2008-01-01.

Prerequisites

  • You must have a valid Amazon Web Services developer account.
  • You must be signed up to use Amazon SQS.

Using the Project

To use this call the static functions in SQSQueryHelper:

Actions for Queues

  • CreateQueue
  • DeleteQueue
  • ListQueues
  • GetQueueAttributes
  • SetQueueAttributes

Actions for Messages

  • SendMessage
  • ReceiveMessage
  • DeleteMessage

Each response lets you view the results as c# properties such as:

ReceiveMessageResponse response = SQSQueryHelper.ReceiveMessage
(accessKeyId, secretAccessKey, queueName);

foreach (Message message in response.ReceiveMessageResult.Message)
{
  Console.WriteLine(message.Body);
  Console.WriteLine(message.ReceiptHandle);
}

You can also view a representation of the original XML:

Console.WriteLine(receiveMessageResponse.ToXML());
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.