Documentation ¶
Overview ¶
Package sqs provides consumer implementation with included tracing capabilities.
Deprecated: The SQS consumer package along with the async component is superseded by the standalone `github.com/beatlabs/component/sqs` package. Please refer to the documents and the examples for the usage.
This package is frozen and no new functionality will be added.
Index ¶
- type Factorydeprecated
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory
deprecated
type Factory struct {
// contains filtered or unexported fields
}
Factory for creating SQS consumers.
Deprecated: The SQS consumer package along with the async component is superseded by the standalone `github.com/beatlabs/component/sqs` package.
func NewFactory
deprecated
type OptionFunc ¶
OptionFunc definition for configuring the consumer in a functional way.
func MaxMessages ¶
func MaxMessages(maxMessages int64) OptionFunc
MaxMessages option for setting the max number of messages fetched. Allowed values are between 1 and 10. If this option is unused, it defaults to 3. If messages can be processed very quickly, maxing out this value is fine, otherwise having a high value is risky as it might trigger the visibility timeout. Having a value too small isn't recommended either, as it increases the number of SQS API requests, thus AWS costs.
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. If this option is unused, it defaults to the queue's default poll settings.
func QueueStatsInterval ¶
func QueueStatsInterval(interval time.Duration) OptionFunc
QueueStatsInterval sets the interval at which we retrieve queue stats. If this option is unused, it defaults to 20 seconds.
func VisibilityTimeout ¶
func VisibilityTimeout(visibilityTimeout int64) OptionFunc
VisibilityTimeout sets the time a message is invisible after it has been requested. This is a built in resiliency mechanism so that, should the consumer fail to acknowledge the message within such timeout, it will become visible again and thus available for retries. Allowed values are between 0 and and 12 hours in seconds. If this option is unused, it defaults to the queue's default visibility settings.