sqs

package
v0.0.0-...-1086ada Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

sqs handles messages from AWS SQS via channels.

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxNumberOfMessages = 1
	VisibilityTimeout   = 600
	WaitTimeSeconds     = 20
)

Functions

func InitRx

func InitRx() (<-chan msg.Raw, chan<- string, error)

InitRx handles receiving and deleting messages from AWS SQS via a pair of channels. Messages from SQS can be received from the read chan. Receipt handles for messages that should be deleted from SQS can be sent to the write chan.

Messages are read from the SQS queue s.MaxNumberOfMessages at a time. They remain invisible or inflight on the SQS queue until either they are deleted by sending the ReceiptHandle to the write chan or they become visible again after s.VisibilityTimeout seconds when they are redelivered. Messages are delivered by SQS at least once. Applications should handle receiving message duplicates.

The chans block for slow consumers.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL