Coder Social home page Coder Social logo

goaws's Introduction

GoAws

Build Status

You are always welcome to tweet the creator in chief or buy him a coffee

Written in Go this is a clone of the AWS SQS/SNS systems. This system is designed to emulate SQS and SNS in a local environment so developers can test their interfaces without having to connect to the AWS Cloud and possibly incurring the expense, or even worse actually write to production topics/queues by mistake. If you see any problems or would like to see a new feature, please open an issue here in github. As well, I will logon to Gitter so we can discuss your deployment issues or the weather.

SNS/SQS Api status:

All SNS/SQS APIs have been implemented except:

  • The full capabilities for Get and Set QueueAttributes. At the moment you can only Get ALL the attributes.

Here is a list of the APIs:

  • ListQueues
  • CreateQueue
  • GetQueueAttributes (unsupported attributes are mocked)
  • GetQueueUrl
  • SendMessage
  • SendMessageBatch
  • ReceiveMessage
  • DeleteMessage
  • DeleteMessageBatch
  • PurgeQueue
  • Delete Queue
  • ChangeMessageVisibility
  • ChangeMessageVisibilityBatch
  • ListDeadLetterSourceQueues
  • ListQueueTags
  • RemovePermission
  • SetQueueAttributes (Only supported attributes are set - see Supported Queue Attributes)
  • TagQueue
  • UntagQueue

Supported Queue Attributes

  • VisibilityTimeout
  • ReceiveMessageWaitTimeSeconds
  • RedrivePolicy

Current SNS APIs implemented:

  • ListTopics
  • CreateTopic
  • Subscribe (raw)
  • ListSubscriptions
  • Publish
  • DeleteTopic
  • Subscribe
  • Unsubscribe
  • ListSubscriptionsByTopic
  • GetSubscriptionAttributes
  • SetSubscriptionAttributes (Only supported attributes are set - see Supported Subscription Attributes)

Supported Subscription Attributes

  • RawMessageDelivery
  • FilterPolicy (Only supported simplest "exact match" filter policy)

Yaml Configuration Implemented

  • Read config file
  • -config flag to read a specific configuration file (e.g.: -config=myconfig.yaml)
  • a command line argument to determine the environment to use in the config file (e.e.: Dev)
  • IN the config file you can create Queues, Topic and Subscription see the example config file in the conf directory

Debug logging can be turned on via a command line flag (e.g.: -debug)

Note: The system does not authenticate or presently use https

Installation

git clone [email protected]:Admiral-Piett/goaws.git

Build and Run (Standalone)

Build
    cd to GoAws directory
    go build -o goaws app/cmd/goaws.go  (The goaws executable should be in the currect directory, move it somewhere in your $PATH)

Run
    ./goaws  (by default goaws listens on port 4100 but you can change it in the goaws.yaml file to another port of your choice)

Run (Docker Version)

Version >= v0.3.2
    docker pull admiralpiett/goaws

Version <= v0.3.1
    docker pull pafortin/goaws

run
    docker run -d --name goaws -p 4100:4100 admiralpiett/goaws

Testing your installation

You can test that your installation is working correctly in one of two ways:

  1. Using the postman collection, use this link to import it. As well the Environment variable for the collection should be set as follows: URL = http://localhost:4100/.

  2. by using the AWS cli tools (download link) here are some samples, you can refer to the aws cli tools docs for further information.

{
    "QueueUrl": "http://localhost:4100/test1"
}
{
    "QueueUrls": [
        "http://localhost:4100/test1"
    ]
}
{
    "MD5OfMessageBody": "9d3f5eaac3b1b4dd509f39e71e25f954",
    "MD5OfMessageAttributes": "b095c6d16871105acb75d59332513337",
    "MessageId": "66a1b4f5-cecf-473e-92b6-810156d41bbe"
}
{
    "Messages": [
        {
            "Body": "this is a test of the GoAws Queue messaging",
            "MD5OfMessageAttributes": "b095c6d16871105acb75d59332513337",
            "ReceiptHandle": "66a1b4f5-cecf-473e-92b6-810156d41bbe#f1fc455c-698e-442e-9747-f415bee5b461",
            "MD5OfBody": "9d3f5eaac3b1b4dd509f39e71e25f954",
            "MessageId": "66a1b4f5-cecf-473e-92b6-810156d41bbe"
        }
    ]
}
No output
No output (No messages in Q)
No output
No output (There are no Queues left)
{
    "Topics": [
        {
            "TopicArn": "arn:aws:sns:local:000000000000:topic1"
        },
        {
            "TopicArn": "arn:aws:sns:local:000000000000:topic2"
        }
    ]
}

goaws's People

Contributors

aarontimbo avatar admiral-piett avatar andykuszyk-form3 avatar bdarfler avatar canthefason avatar damianh avatar days1eeper avatar dependabot[bot] avatar dexm avatar dhumphreys01 avatar eligijusvitkauskas-home24 avatar frodeaa avatar iambbs avatar jacobferm avatar jamiehollern avatar jeloou avatar jemmyw avatar kcajmagic avatar kukushkin avatar matiasanaya-ffx avatar mbklein avatar nelsonjchen avatar nicolas-s-miller avatar p4tin avatar pfortin-urbn avatar queeno avatar sebcante avatar tomasbartkus avatar ugzuzg avatar ulich 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.