sqs

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package sqs provides consumer implementation with included tracing capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

Factory for creating SQS consumers.

func NewFactory

func NewFactory(queue sqsiface.SQSAPI, queueName string, oo ...OptionFunc) (*Factory, error)

NewFactory creates a new consumer factory.

func (*Factory) Create

func (f *Factory) Create() (async.Consumer, error)

Create a new SQS consumer.

type OptionFunc

type OptionFunc func(*Factory) error

OptionFunc definition for configuring the consumer in a functional way.

func Buffer

func Buffer(buffer int) OptionFunc

Buffer sets the concurrency of the messages processing. 0 means wait for the previous messages to be processed.

func MaxMessages

func MaxMessages(maxMessages int64) OptionFunc

MaxMessages option for setting the max number of messages fetched. Allowed values are between 1 and 10.

func PollWaitSeconds

func PollWaitSeconds(pollWaitSeconds int64) OptionFunc

PollWaitSeconds sets the wait time for the long polling mechanism in seconds. Allowed values are between 0 and 20. 0 enables short polling.

func QueueStatsInterval

func QueueStatsInterval(interval time.Duration) OptionFunc

QueueStatsInterval sets the interval at which we retrieve queue stats.

func VisibilityTimeout

func VisibilityTimeout(visibilityTimeout int64) OptionFunc

VisibilityTimeout sets the time a message is invisible after it has been requested. Allowed values are between 0 and and 12 hours in seconds.

Jump to

Keyboard shortcuts

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