aws_sqs_extended_client_go

package module
v0.0.0-...-9e0f5e8 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

README

Amazon SQS Extended Client Library for Go

The Amazon SQS Extended Client Library for Go enables you to manage Amazon SQS message payloads with Amazon S3. This is especially useful for storing and retrieving messages with a message payload size greater than the current SQS limit of 256 KB, up to a maximum of 2 GB. Specifically, you can use this library to:

  • Specify whether message payloads are always stored in Amazon S3 or only when a message's size exceeds 256 KB.

  • Send a message that references a single message object stored in an Amazon S3 bucket.

  • Get the corresponding message object from an Amazon S3 bucket.

  • Delete the corresponding message object from an Amazon S3 bucket.

You can download release builds through the releases section of this project.

For more information on using the amazon-sqs-java-extended-client-lib, see our getting started guide here.

Getting Started

  • Sign up for AWS -- Before you begin, you need an AWS account. For more information about creating an AWS account and retrieving your AWS credentials, see AWS Account and Credentials in the AWS SDK for Java Developer Guide.
  • Sign up for Amazon SQS -- Go to the Amazon SQS console to sign up for the service.
  • Minimum requirements -- To use the sample application, you'll need Java 7 (or later) and Maven 3. For more information about the requirements, see the Getting Started section of the Amazon SQS Developer Guide.
  • Download -- Download the latest preview release or pick it up from Maven:
  <dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>amazon-sqs-java-extended-client-lib</artifactId>
    <version>1.2.0</version>
    <type>jar</type>
  </dependency>

Feedback

  • Give us feedback here.
  • If you'd like to contribute a new feature or bug fix, we'd love to see Github pull requests from you.

mockgen -destination=mocks/mock_s3_svcclnt.go -package=mocks github.com/threehook/aws-sqs-extended-client-go S3SvcClientI
mockgen -destination=mocks/mock_sqs_svcclnt.go -package=mocks github.com/threehook/aws-sqs-extended-client-go SqsSvcClientI

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqsExtendedClient

type SqsExtendedClient struct {
	//private static final Log LOG = LogFactory.getLog(AmazonSQSExtendedClient.class);
	SqsClient       SqsSvcClientI
	SqsClientConfig *config.ExtendedClientConfig
	PayloadStore    payload.PayloadStore
}

func NewSqsExtendedClient

func NewSqsExtendedClient(sqsClient SqsSvcClientI, config *config.ExtendedClientConfig) *SqsExtendedClient

Constructs a new Amazon SQS extended client to invoke service methods on Amazon SQS with extended functionality using the specified Amazon SQS client object.

func (*SqsExtendedClient) AddPermission

func (c *SqsExtendedClient) AddPermission(ctx context.Context, params *sqs.AddPermissionInput, optFns ...func(*sqs.Options)) (*sqs.AddPermissionOutput, error)

func (*SqsExtendedClient) ChangeMessageVisibility

func (c *SqsExtendedClient) ChangeMessageVisibility(ctx context.Context, params *sqs.ChangeMessageVisibilityInput, optFns ...func(*sqs.Options)) (*sqs.ChangeMessageVisibilityOutput, error)

func (*SqsExtendedClient) ChangeMessageVisibilityBatch

func (c *SqsExtendedClient) ChangeMessageVisibilityBatch(ctx context.Context, params *sqs.ChangeMessageVisibilityBatchInput, optFns ...func(*sqs.Options)) (*sqs.ChangeMessageVisibilityBatchOutput, error)

func (*SqsExtendedClient) CreateQueue

func (c *SqsExtendedClient) CreateQueue(ctx context.Context, params *sqs.CreateQueueInput, optFns ...func(*sqs.Options)) (*sqs.CreateQueueOutput, error)

func (*SqsExtendedClient) DeleteMessage

func (c *SqsExtendedClient) DeleteMessage(ctx context.Context, params *sqs.DeleteMessageInput, optFns ...func(*sqs.Options)) (*sqs.DeleteMessageOutput, error)

Deletes the specified message from the specified queue and deletes the message payload from Amazon S3 when necessary. You specify the message by using the message's receipt handle and not the message ID you received when you sent the message. Even if the message is locked by another reader due to the visibility timeout setting, it is still deleted from the queue. If you leave a message in the queue for longer than the queue's configured retention period, Amazon SQS automatically deletes it.

func (*SqsExtendedClient) DeleteMessageBatch

func (c *SqsExtendedClient) DeleteMessageBatch(ctx context.Context, params *sqs.DeleteMessageBatchInput, optFns ...func(*sqs.Options)) (*sqs.DeleteMessageBatchOutput, error)

Deletes up to ten messages from the specified queue. This is a batch version of DeleteMessage. The result of the delete action on each message is reported individually in the response. Also deletes the message payloads from Amazon S3 when necessary.

func (*SqsExtendedClient) DeleteQueue

func (c *SqsExtendedClient) DeleteQueue(ctx context.Context, params *sqs.DeleteQueueInput, optFns ...func(*sqs.Options)) (*sqs.DeleteQueueOutput, error)

func (*SqsExtendedClient) GetQueueAttributes

func (c *SqsExtendedClient) GetQueueAttributes(ctx context.Context, params *sqs.GetQueueAttributesInput, optFns ...func(*sqs.Options)) (*sqs.GetQueueAttributesOutput, error)

func (*SqsExtendedClient) GetQueueUrl

func (c *SqsExtendedClient) GetQueueUrl(ctx context.Context, params *sqs.GetQueueUrlInput, optFns ...func(*sqs.Options)) (*sqs.GetQueueUrlOutput, error)

func (*SqsExtendedClient) ListDeadLetterSourceQueues

func (c *SqsExtendedClient) ListDeadLetterSourceQueues(ctx context.Context, params *sqs.ListDeadLetterSourceQueuesInput, optFns ...func(*sqs.Options)) (*sqs.ListDeadLetterSourceQueuesOutput, error)

func (*SqsExtendedClient) ListQueueTags

func (c *SqsExtendedClient) ListQueueTags(ctx context.Context, params *sqs.ListQueueTagsInput, optFns ...func(*sqs.Options)) (*sqs.ListQueueTagsOutput, error)

func (*SqsExtendedClient) ListQueues

func (c *SqsExtendedClient) ListQueues(ctx context.Context, params *sqs.ListQueuesInput, optFns ...func(*sqs.Options)) (*sqs.ListQueuesOutput, error)

func (*SqsExtendedClient) PurgeQueue

func (c *SqsExtendedClient) PurgeQueue(ctx context.Context, params *sqs.PurgeQueueInput, optFns ...func(*sqs.Options)) (*sqs.PurgeQueueOutput, error)

func (*SqsExtendedClient) ReceiveMessage

func (c *SqsExtendedClient) ReceiveMessage(ctx context.Context, params *sqs.ReceiveMessageInput, optFns ...func(*sqs.Options)) (*sqs.ReceiveMessageOutput, error)

Retrieves one or more messages, with a maximum limit of 10 messages, from the specified queue. Downloads the message payloads from Amazon S3 when necessary. Long poll support is enabled by using the WaitTimeSeconds parameter. For more information, see http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html.

func (*SqsExtendedClient) RemovePermission

func (c *SqsExtendedClient) RemovePermission(ctx context.Context, params *sqs.RemovePermissionInput, optFns ...func(*sqs.Options)) (*sqs.RemovePermissionOutput, error)

func (*SqsExtendedClient) SendMessage

func (c *SqsExtendedClient) SendMessage(ctx context.Context, params *sqs.SendMessageInput, optFns ...func(options *sqs.Options)) (*sqs.SendMessageOutput, error)

Delivers a message to the specified queue and uploads the message payload to Amazon S3 if necessary.

func (*SqsExtendedClient) SendMessageBatch

func (c *SqsExtendedClient) SendMessageBatch(ctx context.Context, params *sqs.SendMessageBatchInput, optFns ...func(*sqs.Options)) (*sqs.SendMessageBatchOutput, error)

Delivers up to ten messages to the specified queue. This is a batch version of SendMessage. The result of the send action on each message is reported individually in the response. Uploads message payloads to Amazon S3 when necessary.

func (*SqsExtendedClient) SetQueueAttributes

func (c *SqsExtendedClient) SetQueueAttributes(ctx context.Context, params *sqs.SetQueueAttributesInput, optFns ...func(*sqs.Options)) (*sqs.SetQueueAttributesOutput, error)

func (*SqsExtendedClient) TagQueue

func (c *SqsExtendedClient) TagQueue(ctx context.Context, params *sqs.TagQueueInput, optFns ...func(*sqs.Options)) (*sqs.TagQueueOutput, error)

func (*SqsExtendedClient) UntagQueue

func (c *SqsExtendedClient) UntagQueue(ctx context.Context, params *sqs.UntagQueueInput, optFns ...func(*sqs.Options)) (*sqs.UntagQueueOutput, error)

type SqsSvcClientI

type SqsSvcClientI interface {
	AddPermission(ctx context.Context, params *sqs.AddPermissionInput, optFns ...func(*sqs.Options)) (*sqs.AddPermissionOutput, error)
	ChangeMessageVisibility(ctx context.Context, params *sqs.ChangeMessageVisibilityInput, optFns ...func(*sqs.Options)) (*sqs.ChangeMessageVisibilityOutput, error)
	ChangeMessageVisibilityBatch(ctx context.Context, params *sqs.ChangeMessageVisibilityBatchInput, optFns ...func(*sqs.Options)) (*sqs.ChangeMessageVisibilityBatchOutput, error)
	CreateQueue(ctx context.Context, params *sqs.CreateQueueInput, optFns ...func(*sqs.Options)) (*sqs.CreateQueueOutput, error)
	DeleteMessage(ctx context.Context, params *sqs.DeleteMessageInput, optFns ...func(*sqs.Options)) (*sqs.DeleteMessageOutput, error)
	DeleteMessageBatch(ctx context.Context, params *sqs.DeleteMessageBatchInput, optFns ...func(*sqs.Options)) (*sqs.DeleteMessageBatchOutput, error)
	DeleteQueue(ctx context.Context, params *sqs.DeleteQueueInput, optFns ...func(*sqs.Options)) (*sqs.DeleteQueueOutput, error)
	GetQueueAttributes(ctx context.Context, params *sqs.GetQueueAttributesInput, optFns ...func(*sqs.Options)) (*sqs.GetQueueAttributesOutput, error)
	GetQueueUrl(ctx context.Context, params *sqs.GetQueueUrlInput, optFns ...func(*sqs.Options)) (*sqs.GetQueueUrlOutput, error)
	ListDeadLetterSourceQueues(ctx context.Context, params *sqs.ListDeadLetterSourceQueuesInput, optFns ...func(*sqs.Options)) (*sqs.ListDeadLetterSourceQueuesOutput, error)
	ListQueues(ctx context.Context, params *sqs.ListQueuesInput, optFns ...func(*sqs.Options)) (*sqs.ListQueuesOutput, error)
	ListQueueTags(ctx context.Context, params *sqs.ListQueueTagsInput, optFns ...func(*sqs.Options)) (*sqs.ListQueueTagsOutput, error)
	PurgeQueue(ctx context.Context, params *sqs.PurgeQueueInput, optFns ...func(*sqs.Options)) (*sqs.PurgeQueueOutput, error)
	ReceiveMessage(ctx context.Context, params *sqs.ReceiveMessageInput, optFns ...func(*sqs.Options)) (*sqs.ReceiveMessageOutput, error)
	RemovePermission(ctx context.Context, params *sqs.RemovePermissionInput, optFns ...func(*sqs.Options)) (*sqs.RemovePermissionOutput, error)
	SendMessage(ctx context.Context, params *sqs.SendMessageInput, optFns ...func(*sqs.Options)) (*sqs.SendMessageOutput, error)
	SendMessageBatch(ctx context.Context, params *sqs.SendMessageBatchInput, optFns ...func(*sqs.Options)) (*sqs.SendMessageBatchOutput, error)
	SetQueueAttributes(ctx context.Context, params *sqs.SetQueueAttributesInput, optFns ...func(*sqs.Options)) (*sqs.SetQueueAttributesOutput, error)
	TagQueue(ctx context.Context, params *sqs.TagQueueInput, optFns ...func(*sqs.Options)) (*sqs.TagQueueOutput, error)
	UntagQueue(ctx context.Context, params *sqs.UntagQueueInput, optFns ...func(*sqs.Options)) (*sqs.UntagQueueOutput, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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