Skip to content
/ q Public

Tiny Go library for receiving messages from AWS Simple Queue Service.

Notifications You must be signed in to change notification settings

SDITools/q

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Q

Tiny Go library for receiving messages from AWS Simple Queue Service.

A wrapper for the AWS Labs SQS library, Q provides facilities for "shifting" messages and polling.

Usage

import (
  "fmt"
  "log"
  "github.com/SDITools/q"
)

var queue = q.New("[your queue url]", "us-east-1", q.QueueParams{})

var msgCh = make(chan string)
var errCh = make(chan error)

func main() {
  go queue.Poll(msgCh, errCh)

  var msg string
  var err error

  for {
    select {
    case msg = <-msgCh:
      fmt.Println(msg)
    case err = <-err:
      log.Error(err)
    }
  }
}

About

Tiny Go library for receiving messages from AWS Simple Queue Service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages