Giter Site home page Giter Site logo

rpm1984 / amazonsqs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brandonc/amazonsqs

0.0 2.0 0.0 3.22 MB

A higher-level interface for Amazon SQS for .NET. It features an object queue (Internally messages are serialized to JSON) and a simple WPF app for probing your queues.

License: MIT License

C# 100.00%

amazonsqs's Introduction

Amazon SQS .NET Object Interface

A higher-level interface to Amazon SQS for .NET. It features an object queue that serializes objects to JSON internally. Also included is a simple WPF app for observing queues and messages. Depends on the AWS SDK for .NET (included).

Example Usage

Create an instance of AmazonSqs.ObjectQueue:

AmazonSqs.ObjectQueue queue = new AmazonSqs.ObjectQueue(
    ConfigurationManager.AppSettings["AWSAccessKey"],   // Or your AWS access key
    ConfigurationManager.AppSettings["AWSSecretKey"],   // Or your AWS secret key
    "MyQueue"                                           // Any queue name
);

queue.Enqueue<List<string>>(new List<string>(new string[] { "Hello", "World", "Bro" }));

Serialized objects must be less than 256K in length. Unfortunately, there's no way of knowing if a type is serializable unless you can successfully serialize and deserialize it. The only thing the library does is ensure your type is a reference type with a default constructor.

// Meanwhile in another place and at another time...

var mylist = queue.DequeueOne<List<string>>();  // Deletes message from queue!

// If you don't want to automatically delete the message you can peek it.

ObjectMessage<List<string>> msg = queue.Peek<List<string>>();
queue.DeleteMessage(msg.ReceiptHandle);

*If you want to run the tests, make a copy of App.config.sample and name it App.config. Add your AWS credentials to the example appSettings.

amazonsqs's People

Contributors

brandonc avatar rpm1984 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.