Documentation ¶
Index ¶
- func FuncByHttpClient(opt *HttpClient) func(options *sqs.Options)
- type Consumer
- func (o *Consumer) SetConsumerMessageTimeout(d time.Duration) *Consumer
- func (o *Consumer) SetDebugMode(b bool) *Consumer
- func (o *Consumer) SetDelayQueryLoop(d time.Duration) *Consumer
- func (o *Consumer) SetDeleteMessageProcessedSuccess(b bool) *Consumer
- func (o *Consumer) SetHttpClient(opt HttpClient) *Consumer
- func (o *Consumer) SetMaxNumberOfMessages(i int32) *Consumer
- func (o *Consumer) SetReceiveRequestAttemptId(s string) *Consumer
- func (o *Consumer) SetVisibilityTimeout(d time.Duration) *Consumer
- func (o *Consumer) SetWaitTimeSeconds(d time.Duration) *Consumer
- type CreateQueue
- type Default
- type HttpClient
- type ListDeadLetterSourceQueues
- func (l *ListDeadLetterSourceQueues) SetDebugMode(b bool) *ListDeadLetterSourceQueues
- func (l *ListDeadLetterSourceQueues) SetHttpClient(opt HttpClient) *ListDeadLetterSourceQueues
- func (l *ListDeadLetterSourceQueues) SetMaxResults(i int32) *ListDeadLetterSourceQueues
- func (l *ListDeadLetterSourceQueues) SetNextToken(nextToken string) *ListDeadLetterSourceQueues
- type ListMessageMoveTasks
- type ListQueues
- func (l *ListQueues) SetDebugMode(b bool) *ListQueues
- func (l *ListQueues) SetHttpClient(opt HttpClient) *ListQueues
- func (l *ListQueues) SetMaxResults(i int32) *ListQueues
- func (l *ListQueues) SetNextToken(nextToken string) *ListQueues
- func (l *ListQueues) SetQueueNamePrefix(queueNamePrefix string) *ListQueues
- type MessageSystemAttributes
- type Producer
- func (p *Producer) SetDebugMode(b bool) *Producer
- func (p *Producer) SetDelaySeconds(t time.Duration) *Producer
- func (p *Producer) SetHttpClient(opt HttpClient) *Producer
- func (p *Producer) SetMessageAttributes(m any) *Producer
- func (p *Producer) SetMessageDeduplicationId(s string) *Producer
- func (p *Producer) SetMessageGroupId(s string) *Producer
- func (p *Producer) SetMessageSystemAttributes(m MessageSystemAttributes) *Producer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FuncByHttpClient ¶
func FuncByHttpClient(opt *HttpClient) func(options *sqs.Options)
Types ¶
type Consumer ¶
type Consumer struct { Default // If true remove the message from the queue after successfully processed (handler error return is null) // // default: false DeleteMessageProcessedSuccess bool // Duration time to process the message, timeout applied in the past context. // // default: 5 seconds ConsumerMessageTimeout time.Duration // Delay to run the next search for messages in the queue // // default: 5 seconds DelayQueryLoop time.Duration // The maximum number of messages to return. Amazon SQS never returns more // messages than this value (however, fewer messages might be returned). Valid // values: 1 to 10. // // default: 10 MaxNumberOfMessages int32 // The duration that the received messages are hidden from subsequent // retrieve requests after being retrieved by a ReceiveMessage request. // // default: 0 seconds VisibilityTimeout time.Duration // This parameter applies only to FIFO (first-in-first-out) queues. The token used // for deduplication of ReceiveMessage calls. If a networking issue occurs after a // ReceiveMessage action, and instead of a response you receive a generic error, it // is possible to retry the same action with an identical ReceiveRequestAttemptId // to retrieve the same set of messages, even if their visibility timeout has not // yet expired. // - You can use ReceiveRequestAttemptId only for 5 minutes after a // ReceiveMessage action. // - When you set FifoQueue , a caller of the ReceiveMessage action can provide a // ReceiveRequestAttemptId explicitly. // - If a caller of the ReceiveMessage action doesn't provide a // ReceiveRequestAttemptId , Amazon SQS generates a ReceiveRequestAttemptId . // - It is possible to retry the ReceiveMessage action with the same // ReceiveRequestAttemptId if none of the messages have been modified (deleted or // had their visibility changes). // - During a visibility timeout, subsequent calls with the same // ReceiveRequestAttemptId return the same messages and receipt handles. If a // retry occurs within the deduplication interval, it resets the visibility // timeout. For more information, see Visibility Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon SQS Developer Guide. If a caller of the ReceiveMessage action // still processes messages when the visibility timeout expires and messages become // visible, another worker consuming from the same queue can receive the same // messages and therefore process duplicates. Also, if a consumer whose message // processing time is longer than the visibility timeout tries to delete the // processed messages, the action fails with an error. To mitigate this effect, // ensure that your application observes a safe threshold before the visibility // timeout expires and extend the visibility timeout as necessary. // - While messages with a particular MessageGroupId are invisible, no more // messages belonging to the same MessageGroupId are returned until the // visibility timeout expires. You can still receive messages with another // MessageGroupId as long as it is also visible. // - If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId , no // retries work until the original visibility timeout expires. As a result, delays // might occur but the messages in the queue remain in a strict order. // The maximum length of ReceiveRequestAttemptId is 128 characters. // ReceiveRequestAttemptId can contain alphanumeric characters ( a-z , A-Z , 0-9 ) // and punctuation ( !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ). For best practices of // using ReceiveRequestAttemptId , see Using the ReceiveRequestAttemptId Request // Parameter (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html) // in the Amazon SQS Developer Guide. ReceiveRequestAttemptId *string // The duration for which the call waits for a message to arrive in // the queue before returning. If a message is available, the call returns sooner // than WaitTimeSeconds . If no messages are available and the wait time expires, // the call returns successfully with an empty list of messages. To avoid HTTP // errors, ensure that the HTTP response timeout for ReceiveMessage requests is // longer than the WaitTimeSeconds parameter. For example, with the Java SDK, you // can set HTTP transport settings using the NettyNioAsyncHttpClient (https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html) // for asynchronous clients, or the ApacheHttpClient (https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html) // for synchronous clients. // // default: 0 seconds WaitTimeSeconds time.Duration }
func GetConsumerByParams ¶
func NewConsumer ¶
func NewConsumer() *Consumer
func (*Consumer) SetConsumerMessageTimeout ¶
func (*Consumer) SetDebugMode ¶
func (*Consumer) SetDelayQueryLoop ¶
func (*Consumer) SetDeleteMessageProcessedSuccess ¶
func (*Consumer) SetHttpClient ¶
func (o *Consumer) SetHttpClient(opt HttpClient) *Consumer
func (*Consumer) SetMaxNumberOfMessages ¶
func (*Consumer) SetReceiveRequestAttemptId ¶
func (*Consumer) SetVisibilityTimeout ¶
type CreateQueue ¶
type CreateQueue struct { Default // A map of attributes with their corresponding values. The following lists the // names, descriptions, and values of the special request parameters that the // NewCreateQueue action uses: // - DelaySeconds – The length of time, in seconds, for which the delivery of all // messages in the queue is delayed. Valid values: An integer from 0 to 900 seconds // (15 minutes). Default: 0. // - MaximumMessageSize – The limit of how many bytes a message can contain // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB) // to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB). // - MessageRetentionPeriod – The length of time, in seconds, for which Amazon // SQS retains a message. Valid values: An integer from 60 seconds (1 minute) to // 1,209,600 seconds (14 days). Default: 345,600 (4 days). When you change a // queue's attributes, the change can take up to 60 seconds for most of the // attributes to propagate throughout the Amazon SQS system. Changes made to the // MessageRetentionPeriod attribute can take up to 15 minutes and will impact // existing messages in the queue potentially causing them to be expired and // deleted if the MessageRetentionPeriod is reduced below the age of existing // messages. // - Policy – The queue's policy. A valid Amazon Web Services policy. For more // information about policy structure, see Overview of Amazon Web Services IAM // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) // in the IAM User Guide. // - ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for which a // ReceiveMessage action waits for a message to arrive. Valid values: An integer // from 0 to 20 (seconds). Default: 0. // - VisibilityTimeout – The visibility timeout for the queue, in seconds. Valid // values: An integer from 0 to 43,200 (12 hours). Default: 30. For more // information about the visibility timeout, see Visibility Timeout (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon SQS Developer Guide. // The following attributes apply only to dead-letter queues: (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) // - RedrivePolicy – The string that includes the parameters for the dead-letter // queue functionality of the source queue as a JSON object. The parameters are as // follows: // - deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter // queue to which Amazon SQS moves messages after the value of maxReceiveCount is // exceeded. // - maxReceiveCount – The number of times a message is delivered to the source // queue before being moved to the dead-letter queue. Default: 10. When the // ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS // moves the message to the dead-letter-queue. // - RedriveAllowPolicy – The string that includes the parameters for the // permissions for the dead-letter queue redrive permission and which source queues // can specify dead-letter queues as a JSON object. The parameters are as follows: // - redrivePermission – The permission type that defines which source queues can // specify the current queue as the dead-letter queue. Valid values are: // - allowAll – (Default) Any source queues in this Amazon Web Services account // in the same Region can specify this queue as the dead-letter queue. // - denyAll – No source queues can specify this queue as the dead-letter queue. // - byQueue – Only queues specified by the sourceQueueArns parameter can specify // this queue as the dead-letter queue. // - sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that // can specify this queue as the dead-letter queue and redrive messages. You can // specify this parameter only when the redrivePermission parameter is set to // byQueue . You can specify up to 10 source queue ARNs. To allow more than 10 // source queues to specify dead-letter queues, set the redrivePermission // parameter to allowAll . // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the // dead-letter queue of a standard queue must also be a standard queue. The // following attributes apply only to server-side-encryption (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html) // : // - KmsMasterKeyId – The ID of an Amazon Web Services managed customer master // key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms) // . While the alias of the Amazon Web Services managed CMK for Amazon SQS is // always alias/aws/sqs , the alias of a custom CMK can, for example, be // alias/MyAlias . For more examples, see KeyId (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) // in the Key Management Service API Reference. // - KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for which // Amazon SQS can reuse a data key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) // to encrypt or decrypt messages before calling KMS again. An integer representing // seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: // 300 (5 minutes). A shorter time period provides better security but results in // more calls to KMS which might incur charges after Free Tier. For more // information, see How Does the Data Key Reuse Period Work? (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work) // - SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned // encryption keys. Only one server-side encryption option is supported per queue // (for example, SSE-KMS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html) // or SSE-SQS (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html) // ). // The following attributes apply only to FIFO (first-in-first-out) queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html) // : // - FifoQueue – Designates a queue as FIFO. Valid values are true and false . If // you don't specify the FifoQueue attribute, Amazon SQS creates a standard // queue. You can provide this attribute only during queue creation. You can't // change it for an existing queue. When you set this attribute, you must also // provide the MessageGroupId for your messages explicitly. For more information, // see FIFO queue logic (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-understanding-logic.html) // in the Amazon SQS Developer Guide. // - ContentBasedDeduplication – Enables content-based deduplication. Valid // values are true and false . For more information, see Exactly-once processing (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html) // in the Amazon SQS Developer Guide. Note the following: // - Every message must have a unique MessageDeduplicationId . // - You may provide a MessageDeduplicationId explicitly. // - If you aren't able to provide a MessageDeduplicationId and you enable // ContentBasedDeduplication for your queue, Amazon SQS uses an SHA-256 hash to // generate the MessageDeduplicationId using the body of the message (but not the // attributes of the message). // - If you don't provide a MessageDeduplicationId and the queue doesn't have // ContentBasedDeduplication set, the action fails with an error. // - If the queue has ContentBasedDeduplication set, your MessageDeduplicationId // overrides the generated one. // - When ContentBasedDeduplication is in effect, messages with identical content // sent within the deduplication interval are treated as duplicates and only one // copy of the message is delivered. // - If you send one message with ContentBasedDeduplication enabled and then // another message with a MessageDeduplicationId that is the same as the one // generated for the first MessageDeduplicationId , the two messages are treated // as duplicates and only one copy of the message is delivered. // The following attributes apply only to high throughput for FIFO queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html) // : // - DeduplicationScope – Specifies whether message deduplication occurs at the // message group or queue level. Valid values are messageGroup and queue . // - FifoThroughputLimit – Specifies whether the FIFO queue throughput quota // applies to the entire queue or per message group. Valid values are perQueue // and perMessageGroupId . The perMessageGroupId value is allowed only when the // value for DeduplicationScope is messageGroup . // To enable high throughput for FIFO queues, do the following: // - Set DeduplicationScope to messageGroup . // - Set FifoThroughputLimit to perMessageGroupId . // If you set these attributes to anything other than the values shown for // enabling high throughput, normal throughput is in effect and deduplication // occurs as specified. For information on throughput quotas, see Quotas related // to messages (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html) // in the Amazon SQS Developer Guide. Attributes map[string]string // Add cost allocation tags to the specified Amazon SQS queue. For an overview, // see Tagging Your Amazon SQS Queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) // in the Amazon SQS Developer Guide. When you use queue tags, keep the following // guidelines in mind: // - Adding more than 50 tags to a queue isn't recommended. // - Tags don't have any semantic meaning. Amazon SQS interprets tags as // character strings. // - Tags are case-sensitive. // - A new tag with a key identical to that of an existing tag overwrites the // existing tag. // For a full list of tag restrictions, see Quotas related to queues (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) // in the Amazon SQS Developer Guide. To be able to tag a queue on creation, you // must have the sqs:CreateQueue and sqs:TagQueue permissions. Cross-account // permissions don't apply to this action. For more information, see Grant // cross-account permissions to a role and a username (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) // in the Amazon SQS Developer Guide. Tags map[string]string }
func GetCreateQueueByParams ¶
func GetCreateQueueByParams(opts []*CreateQueue) *CreateQueue
func NewCreateQueue ¶
func NewCreateQueue() *CreateQueue
func (*CreateQueue) SetAttributes ¶
func (c *CreateQueue) SetAttributes(m map[string]string) *CreateQueue
func (*CreateQueue) SetDebugMode ¶
func (c *CreateQueue) SetDebugMode(b bool) *CreateQueue
func (*CreateQueue) SetHttpClient ¶
func (c *CreateQueue) SetHttpClient(opt HttpClient) *CreateQueue
func (*CreateQueue) SetTags ¶
func (c *CreateQueue) SetTags(m map[string]string) *CreateQueue
type Default ¶
type Default struct { // HTTP communication customization options with AWS SQS HttpClient *HttpClient `json:"httpClient,omitempty"` // if true and print all information and error logs DebugMode bool `json:"debugMode,omitempty"` }
func GetDefaultByParams ¶
func NewDefault ¶
func NewDefault() *Default
func (*Default) SetDebugMode ¶
func (*Default) SetHttpClient ¶
func (d *Default) SetHttpClient(httpClient HttpClient) *Default
type HttpClient ¶
type HttpClient struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this sqsClient. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // The optional application specific identifier appended to the User-Agent header. AppID string // This endpoint will be given as input to an EndpointResolverV2. It is used for // providing a custom base endpoint that is subject to modifications by the // processing EndpointResolverV2. BaseEndpoint *string // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // Allows you to disable the client's validation of response message checksums. // Enabled by default. Used by SendMessage, SendMessageBatch, and ReceiveMessage. DisableMessageChecksumValidation bool // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions sqs.EndpointResolverOptions // Resolves the endpoint used for a particular service operation. This should be // used over the deprecated EndpointResolver. EndpointResolverV2 sqs.EndpointResolverV2 // Signature Version 4 (SigV4) Signer HTTPSignerV4 sqs.HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. If specified in an operation call's // functional options with a value that is different from the constructed client's // Options, the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently, does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient sqs.HTTPClient // The auth scheme resolver which determines how to authenticate for each // operation. AuthSchemeResolver sqs.AuthSchemeResolver // The list of auth schemes supported by the sqsClient. AuthSchemes []smithyhttp.AuthScheme // contains filtered or unexported fields }
type ListDeadLetterSourceQueues ¶
type ListDeadLetterSourceQueues struct { Default // Maximum number of results to include in the response. Value range is 1 to 1000. // You must set MaxResults to receive a value for NextToken in the response. // default 100 MaxResults int32 // Pagination token to request the next set of results. NextToken *string }
func GetListDeadLetterSourceQueuesByParams ¶
func GetListDeadLetterSourceQueuesByParams(opts []*ListDeadLetterSourceQueues) *ListDeadLetterSourceQueues
func NewListDeadLetterSourceQueues ¶
func NewListDeadLetterSourceQueues() *ListDeadLetterSourceQueues
func (*ListDeadLetterSourceQueues) SetDebugMode ¶
func (l *ListDeadLetterSourceQueues) SetDebugMode(b bool) *ListDeadLetterSourceQueues
func (*ListDeadLetterSourceQueues) SetHttpClient ¶
func (l *ListDeadLetterSourceQueues) SetHttpClient(opt HttpClient) *ListDeadLetterSourceQueues
func (*ListDeadLetterSourceQueues) SetMaxResults ¶
func (l *ListDeadLetterSourceQueues) SetMaxResults(i int32) *ListDeadLetterSourceQueues
func (*ListDeadLetterSourceQueues) SetNextToken ¶
func (l *ListDeadLetterSourceQueues) SetNextToken(nextToken string) *ListDeadLetterSourceQueues
type ListMessageMoveTasks ¶
type ListMessageMoveTasks struct { Default // The maximum number of results to include in the response. The default is 1, // which provides the most recent message movement task. The upper limit is 10. MaxResults int32 }
func GetListMessageMoveTaskByParams ¶
func GetListMessageMoveTaskByParams(opts []*ListMessageMoveTasks) *ListMessageMoveTasks
func NewListMessageMoveTasks ¶
func NewListMessageMoveTasks() *ListMessageMoveTasks
func (*ListMessageMoveTasks) SetDebugMode ¶
func (l *ListMessageMoveTasks) SetDebugMode(b bool) *ListMessageMoveTasks
func (*ListMessageMoveTasks) SetHttpClient ¶
func (l *ListMessageMoveTasks) SetHttpClient(opt HttpClient) *ListMessageMoveTasks
func (*ListMessageMoveTasks) SetMaxResults ¶
func (l *ListMessageMoveTasks) SetMaxResults(i int32) *ListMessageMoveTasks
type ListQueues ¶
type ListQueues struct { Default // Maximum number of results to include in the response. Value range is 1 to 1000. // You must set MaxResults to receive a value for NextToken in the response. MaxResults int32 // Pagination token to request the next set of results. NextToken *string // A string to use for filtering the list results. Only those queues whose name // begins with the specified string are returned. Queue URLs and names are // case-sensitive. QueueNamePrefix *string }
func GetListQueuesByParams ¶
func GetListQueuesByParams(opts []*ListQueues) *ListQueues
func NewListQueue ¶
func NewListQueue() *ListQueues
func (*ListQueues) SetDebugMode ¶
func (l *ListQueues) SetDebugMode(b bool) *ListQueues
func (*ListQueues) SetHttpClient ¶
func (l *ListQueues) SetHttpClient(opt HttpClient) *ListQueues
func (*ListQueues) SetMaxResults ¶
func (l *ListQueues) SetMaxResults(i int32) *ListQueues
func (*ListQueues) SetNextToken ¶
func (l *ListQueues) SetNextToken(nextToken string) *ListQueues
func (*ListQueues) SetQueueNamePrefix ¶
func (l *ListQueues) SetQueueNamePrefix(queueNamePrefix string) *ListQueues
type MessageSystemAttributes ¶
type MessageSystemAttributes struct { // its value must be a correctly formatted X-Ray // trace header string. // // this member is required AWSTraceHeader string `json:"AWSTraceHeader,omitempty"` }
type Producer ¶
type Producer struct { Default // The length of time, in seconds, for which to delay a specific message. Maximum: 15 minutes. // Messages with a positive DelaySeconds value become available for processing after the delay period is finished. // If you don't specify a value, the default value for the queue applies. When you set // FifoQueue , you can't set DelaySeconds per message. You can set this parameter // only on a queue level. DelaySeconds time.Duration `json:"delaySeconds,omitempty"` // Message attributes, must be of type Map or Struct, other types are not acceptable. MessageAttributes any `json:"messageAttributes,omitempty"` // The message system attribute to send. // - Currently, the only supported message system attribute is AWSTraceHeader . // Its type must be String and its value must be a correctly formatted X-Ray // trace header string. // - The size of a message system attribute doesn't count towards the total size // of a message. MessageSystemAttributes *MessageSystemAttributes `json:"messageSystemAttributes,omitempty"` // This parameter applies only to FIFO (first-in-first-out) queues. The token used // for deduplication of sent messages. If a message with a particular // MessageDeduplicationId is sent successfully, any messages sent with the same // MessageDeduplicationId are accepted successfully but aren't delivered during the // 5-minute deduplication interval. For more information, see Exactly-once // processing (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html) // in the Amazon SQS Developer Guide. // - Every message must have a unique MessageDeduplicationId , // - You may provide a MessageDeduplicationId explicitly. // - If you aren't able to provide a MessageDeduplicationId and you enable // ContentBasedDeduplication for your queue, Amazon SQS uses an SHA-256 hash to // generate the MessageDeduplicationId using the body of the message (but not the // attributes of the message). // - If you don't provide a MessageDeduplicationId and the queue doesn't have // ContentBasedDeduplication set, the action fails with an error. // - If the queue has ContentBasedDeduplication set, your MessageDeduplicationId // overrides the generated one. // - When ContentBasedDeduplication is in effect, messages with identical content // sent within the deduplication interval are treated as duplicates and only one // copy of the message is delivered. // - If you send one message with ContentBasedDeduplication enabled and then // another message with a MessageDeduplicationId that is the same as the one // generated for the first MessageDeduplicationId , the two messages are treated // as duplicates and only one copy of the message is delivered. // The MessageDeduplicationId is available to the consumer of the message (this // can be useful for troubleshooting delivery issues). If a message is sent // successfully but the acknowledgement is lost and the message is resent with the // same MessageDeduplicationId after the deduplication interval, Amazon SQS can't // detect duplicate messages. Amazon SQS continues to keep track of the message // deduplication ID even after the message is received and deleted. The maximum // length of MessageDeduplicationId is 128 characters. MessageDeduplicationId can // contain alphanumeric characters ( a-z , A-Z , 0-9 ) and punctuation ( // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ). For best practices of using // MessageDeduplicationId , see Using the MessageDeduplicationId Property (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html) // in the Amazon SQS Developer Guide. MessageDeduplicationId *string `json:"messageDeduplicationId,omitempty"` // This parameter applies only to FIFO (first-in-first-out) queues. The tag that // specifies that a message belongs to a specific message group. Messages that // belong to the same message group are processed in a FIFO manner (however, // messages in different message groups might be processed out of order). To // interleave multiple ordered streams within a single queue, use MessageGroupId // values (for example, session data for multiple users). In this scenario, // multiple consumers can process the queue, but the session data of each user is // processed in a FIFO fashion. // - You must associate a non-empty MessageGroupId with a message. If you don't // provide a MessageGroupId , the action fails. // - ReceiveMessage might return messages with multiple MessageGroupId values. // For each MessageGroupId , the messages are sorted by time sent. The caller // can't specify a MessageGroupId . // The length of MessageGroupId is 128 characters. Valid values: alphanumeric // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) . For best // practices of using MessageGroupId , see Using the MessageGroupId Property (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html) // in the Amazon SQS Developer Guide. MessageGroupId is required for FIFO queues. // You can't use it for Standard queues. MessageGroupId *string `json:"messageGroupId,omitempty"` }
func GetProducerByParams ¶
func NewProducer ¶
func NewProducer() *Producer
func (*Producer) SetDebugMode ¶
func (*Producer) SetHttpClient ¶
func (p *Producer) SetHttpClient(opt HttpClient) *Producer
func (*Producer) SetMessageAttributes ¶
func (*Producer) SetMessageDeduplicationId ¶
func (*Producer) SetMessageGroupId ¶
func (*Producer) SetMessageSystemAttributes ¶
func (p *Producer) SetMessageSystemAttributes(m MessageSystemAttributes) *Producer
Click to show internal directories.
Click to hide internal directories.