Giter Site home page Giter Site logo

spoonscen / simple-sqsd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fterrag/simple-sqsd

0.0 1.0 0.0 43 KB

A simple version of the AWS Elastic Beanstalk Worker Environment SQS daemon

Home Page: https://hub.docker.com/r/fterrag/simple-sqsd/

License: MIT License

Go 95.69% Shell 2.43% Dockerfile 1.88%

simple-sqsd's Introduction

Build Status Go Report Card

simple-sqsd

A simple version of the AWS Elastic Beanstalk Worker Environment SQS daemon (sqsd).

Getting Started

$ SQSD_QUEUE_REGION=us-east-1 SQSD_QUEUE_URL=http://queue.url SQSD_HTTP_URL=http://service.url/endpoint go run cmd/simplesqsd/simplesqsd.go

Docker (uses a Docker Hub repository):

$ docker run -e AWS_ACCESS_KEY_ID=your-access-id AWS_SECRET_ACCESS_KEY=your-secret-key SQSD_QUEUE_REGION=us-east-1 -e SQSD_QUEUE_URL=http://queue.url -e SQSD_HTTP_URL=http://service.url/endpoint fterrag/simple-sqsd:latest

Configuration

Environment Variable Default Value Required Description
SQSD_QUEUE_REGION yes The region of the SQS queue.
SQSD_QUEUE_URL yes The URL of the SQS queue.
SQSD_QUEUE_MAX_MSGS 10 no Max number of messages a worker should try to receive from the SQS queue.
SQSD_QUEUE_WAIT_TIME 10 no Number of seconds for SQS to wait until a message is available in the queue before sending a response.
SQSD_HTTP_MAX_CONNS 50 no Maximum number of concurrent HTTP requests to make to SQSD_HTTP_URL.
SQSD_HTTP_URL yes The URL of your service to make a request to.
SQSD_HTTP_CONTENT_TYPE no The value to send for the HTTP header Content-Type when making a request to your service.
SQSD_AWS_ENDPOINT no Sets the AWS endpoint.
SQSD_HTTP_HMAC_HEADER no The name of the HTTP header to send the HMAC hash with.
SQSD_HMAC_SECRET_KEY no Secret key to use when generating HMAC hash send to SQSD_HTTP_URL.
SQSD_HTTP_HEALTH_PATH no The path to a health check endpoint of your service. When provided, messages will not be processed until the health check returns a 200 for HTTPHealthInterval times
SQSD_HTTP_HEALTH_WAIT 5 no How long to wait before starting health checks
SQSD_HTTP_HEALTH_INTERVAL 5 no How often to wait between health checks
SQSD_HTTP_HEALTH_SUCCESS_COUNT 1 no How many successful health checks required in a row
SQSD_HTTP_TIMEOUT 5 no Number of seconds to wait for a response from the worker
SQSD_SQS_HTTP_TIMEOUT 5 no Number of seconds to wait for a response from sqs
SQSD_HTTP_SSL_VERIFY true no Enable SSL Verification on the URL of your service to make a request to (if you're using self-signed certificate)

HMAC

Optionally (when SQSD_HTTP_HMAC_HEADER and SQSD_HMAC_SECRET_KEY are set), HMAC hashes are generated using SHA-256 with the signature made up of the following:

POST {SQSD_HTTP_URL}\n
<SQS message body>

Support 429 Status codes with Retry-After

  • SQSD will attempt to change the message visibility when the service responds with 429 status code.
  • Retry-After response header should contain an integer with the amount of senconds to wait.

Todo

  • More Tests
  • Documentation

Contributing

  • Submit a PR
  • Add or improve documentation
  • Report issues
  • Suggest new features or enhancements

simple-sqsd's People

Contributors

carsonoid avatar flindskog avatar fterrag avatar jenriquejr avatar jsainthilaire avatar julienbornstein avatar spoonscen avatar

Watchers

 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.