public class SQSOperations extends Object
| Constructor and Description |
|---|
SQSOperations() |
| Modifier and Type | Method and Description |
|---|---|
String |
addPermission(SQSConfiguration config,
SQSConnection client,
String label,
List<String> accountIds,
List<String> actions,
String queueUrl)
This operation adds a permission to a message queue.
|
String |
changeMessageVisibility(SQSConfiguration config,
SQSConnection client,
String receiptHandle,
Integer visibilityTimeout,
TimeUnit visibilityTimeoutUnit,
String queueUrl)
This operation changes the visibility timeout of a specified message in a queue to a new value, not to exceed 12 hours.
|
org.mule.runtime.extension.api.runtime.operation.Result<BatchResult,RequestIDAttribute> |
changeMessageVisibilityBatch(SQSConfiguration config,
SQSConnection client,
List<ChangeMessageVisibilityBatchRequestEntry> receiptHandles,
String queueUrl)
This operation changes the visibility timeout of up to 10 ChangeMessageVisibility requests, with each result reported individually in the response.
|
org.mule.runtime.extension.api.runtime.operation.Result<String,RequestIDAttribute> |
createQueue(SQSConnection client,
String queueName,
Map<String,String> attributes)
This operation creates a new queue, or returns the URL of an existing one.
|
String |
deleteMessage(SQSConfiguration config,
SQSConnection client,
String receiptHandle,
String queueUrl)
This operation deletes the message identified by the message object in the queue.
|
org.mule.runtime.extension.api.runtime.operation.Result<BatchResult,RequestIDAttribute> |
deleteMessageBatch(SQSConfiguration config,
SQSConnection client,
List<DeleteMessageBatchRequestEntry> entries,
String queueUrl)
This operation deletes up to 10 messages from the specified queue.
|
String |
deleteQueue(SQSConfiguration config,
SQSConnection client,
String queueUrl)
This operation deletes the message queue represented by this object and can even delete a non-empty queue.
|
org.mule.runtime.extension.api.runtime.operation.Result<Integer,RequestIDAttribute> |
getApproximateNumberOfMessages(SQSConfiguration config,
SQSConnection client,
String queueUrl)
This operation retrieves an approximate number of visible messages for a queue.
|
org.mule.runtime.extension.api.runtime.operation.Result<Map<String,String>,RequestIDAttribute> |
getQueueAttributes(SQSConfiguration config,
SQSConnection client,
List<String> attributeNames,
String queueUrl)
This operation shows queue attributes to expose the underlying functionality.
|
org.mule.runtime.extension.api.runtime.operation.Result<String,RequestIDAttribute> |
getQueueUrl(SQSConnection client,
String queueName,
String queueOwnerAWSAccountId)
This operation returns the URL of an existing queue.
|
org.mule.runtime.extension.api.runtime.operation.Result<List<String>,RequestIDAttribute> |
listDeadLetterSourceQueues(SQSConfiguration config,
SQSConnection client,
String queueUrl)
This operation returns a list of the queues that have the RedrivePolicy queue attribute configured with a dead-letter queue.
|
org.mule.runtime.extension.api.runtime.operation.Result<List<String>,RequestIDAttribute> |
listQueues(SQSConnection client,
String queueNamePrefix)
This operation returns a list of your queues.
|
String |
purgeQueue(SQSConfiguration config,
SQSConnection client,
String queueUrl)
This operation deletes the messages in a queue specified by the queue URL.
|
org.mule.runtime.extension.api.runtime.operation.Result<List<Message>,RequestIDAttribute> |
read(SQSConfiguration config,
SQSConnection client,
String queueUrl,
int waitTime,
int maxNumberOfMessages)
This operation reads a number of messages from a queue.
|
String |
removePermission(SQSConfiguration config,
SQSConnection client,
String label,
String queueUrl)
This operation removes a permission from this message queue.
|
org.mule.runtime.extension.api.runtime.operation.Result<SendMessageResult,RequestIDAttribute> |
sendMessage(SQSConfiguration config,
SQSConnection client,
Message message,
String queueUrl)
This operation sends a message to a specified queue.
|
org.mule.runtime.extension.api.runtime.operation.Result<BatchResult,RequestIDAttribute> |
sendMessageBatch(SQSConfiguration config,
SQSConnection client,
List<Message> messages,
String queueUrl)
This operation delivers up to 10 messages to the specified queue.
|
String |
setQueueAttributes(SQSConfiguration config,
SQSConnection client,
Map<String,String> attributes,
String queueUrl)
This operation sets the value of one or more queue attributes, which can take up to 60 seconds to propagate
throughout the SQS system (although changes made to the MessageRetentionPeriod attribute can take up to 15 minutes).
|
@MediaType(value="text/plain") @Throws(value=AddPermissionErrorTypeProvider.class) public String addPermission(@Config SQSConfiguration config, @Connection SQSConnection client, String label, List<String> accountIds, List<String> actions, @Summary(value="Permissions will be added to the queue represented by this URL. This parameter is optional, and if you do not specify queueUrl, you must specify the default global queue URL at the configuration level.") @Optional String queueUrl)
config - configurationclient - connectionlabel - Name for this permissionaccountIds - IDs of the AWS accounts to share this queue withactions - List to indicate how much to share (SendMessage, ReceiveMessage, ChangeMessageVisibility, DeleteMessage, GetQueueAttributes)queueUrl - Permissions will be added to the queue represented by this URL.
This parameter is optional, and if you do not specify queueUrl, you must specify the default global queue URL at the configuration level.@MediaType(value="text/plain") @Throws(value=ChangeMessageVisibilityErrorTypeProvider.class) public String changeMessageVisibility(@Config SQSConfiguration config, @Connection SQSConnection client, @Optional @Example(value="#[header:inbound:sqs.message.receipt.handle]") String receiptHandle, Integer visibilityTimeout, @Optional(defaultValue="SECONDS") TimeUnit visibilityTimeoutUnit, @Summary(value="The URL of the Amazon SQS queue to take action on. This parameter is optional, and if you do not specify queueUrl, you must specify the Default Global Queue URL at the configuration level.") @Optional String queueUrl)
config - configurationclient - connectionreceiptHandle - Receipt handle associated with the message whose visibility timeout must changevisibilityTimeout - New value of the message visibility timeout (up to 4300 seconds or 12 hours)queueUrl - URL of the Amazon SQS queue to act on.
This parameter is optional, and if you do not specify queueUrl, you must specify the Default Global Queue URL at the configuration level.@Throws(value=LargePayloadErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<BatchResult,RequestIDAttribute> changeMessageVisibilityBatch(@Config SQSConfiguration config, @Connection SQSConnection client, @Content List<ChangeMessageVisibilityBatchRequestEntry> receiptHandles, @Summary(value="The URL of the Amazon SQS queue to take action on. This parameter is optional, and if you do not specify queueUrl, you must specify the Default Global Queue URL at the configuration level.") @Optional String queueUrl)
config - configurationclient - connectionreceiptHandles - List of receipt handles of the messages for which the visibility timeout must be changedqueueUrl - URL of the Amazon SQS queue to act on.
This parameter is optional, and if you do not specify queueUrl, you must specify the Default Global Queue URL at the configuration level.@MediaType(value="text/plain") @Throws(value=CreateQueueErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<String,RequestIDAttribute> createQueue(@Connection SQSConnection client, String queueName, @NullSafe @Optional @Content Map<String,String> attributes)
| Name | Type | Description | Default Value |
|---|---|---|---|
| All | All values. | ||
| DelaySeconds | Number | 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). | 0 |
| MaximumMessageSize | Number | NuThe 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). | 262,144 (256 KiB) |
| MessageRetentionPeriod | Number | NumbThe 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) | 345,600 (4 days) |
| Policy | String | The queue's policy. A valid AWS policy. | |
| ReceiveMessageWaitTimeSeconds | Number | 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) | 0 |
| RedrivePolicy | String | The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object. | |
| VisibilityTimeout | Number | The visibility timeout for the queue, in seconds. Valid values: An integer from 0 to 43,200 (12 hours). | 30 |
| KmsMasterKeyId | String | The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. | |
| KmsDataKeyReusePeriodSeconds | Number | The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). | 300 (5 minutes). |
| FifoQueue | Boolean | Designates a queue as FIFO. Valid values: true, 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. | |
| ContentBasedDeduplication | Boolean | Enables content-based deduplication. Valid values: true, false. Every message must have a unique MessageDeduplicationId. | |
| ApproximateNumberOfMessages | Number | The approximate number of messages available for retrieval from the queue. | |
| ApproximateNumberOfMessagesDelayed | Number | The approximate number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter. | |
| ApproximateNumberOfMessagesNotVisible | Number | The approximate number of messages that are in flight. Messages are considered to be in flight if they have been sent to a client but have not yet been deleted or have not yet reached the end of their visibility window. | |
| CreatedTimestamp | Number | The time when the queue was created in seconds | |
| LastModifiedTimestamp | Number | The time when the queue was last changed in seconds | |
| QueueArn | String | The Amazon resource name (ARN) of the queue |
| Name | Type | Description | Default Value |
| deadLetterTargetArn | String | The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount is exceeded. | |
| maxReceiveCount | Number | The number of times a message is delivered to the source queue before being moved to the dead-letter queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves the message to the dead-letter-queue. |
client - connectionqueueName - Name of the queue to be createdattributes - A map of attributes with their corresponding values. (See the table above)@MediaType(value="text/plain") @Throws(value=LargePayloadErrorTypeProvider.class) public String deleteMessage(@Config SQSConfiguration config, @Connection SQSConnection client, String receiptHandle, @Summary(value="URL of the queue to delete messages from. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionreceiptHandle - Receipt handle of the message to be deletedqueueUrl - URL of the queue to delete messages from.
This parameter is optional and if you do not specify queueUrl you need to set
in the configuration level Default Global Queue URL.@Throws(value=LargePayloadErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<BatchResult,RequestIDAttribute> deleteMessageBatch(@Config SQSConfiguration config, @Connection SQSConnection client, List<DeleteMessageBatchRequestEntry> entries, @Summary(value="URL of the queue to delete messages as a batch from. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionentries - List of receipt handles for the messages to be deletedqueueUrl - URL of the queue to delete messages as a batch from.
This parameter is optional and if you do not specify queueUrl you need to set
in the configuration level Default Global Queue URL.@MediaType(value="text/plain") @Throws(value=CommonErrorTypeProvider.class) public String deleteQueue(@Config SQSConfiguration config, @Connection SQSConnection client, @Summary(value="URL of the queue to delete. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionqueueUrl - URL of the queue to delete.
This parameter is optional and if you do not specify queueUrl you need to set
in the configuration level Default Global Queue URL.@Throws(value=CommonErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<Map<String,String>,RequestIDAttribute> getQueueAttributes(@Config SQSConfiguration config, @Connection SQSConnection client, @Optional @NullSafe List<String> attributeNames, @Summary(value="URL of the Amazon SQS queue to take action on This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionattributeNames - List of attribute retrieve information forqueueUrl - URL of the Amazon SQS queue to take action on
This parameter is optional and if you do not specify queueUrl you need to set
in the configuration level Default Global Queue URL.@MediaType(value="text/plain") @Throws(value=CommonErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<String,RequestIDAttribute> getQueueUrl(@Connection SQSConnection client, String queueName, @Optional String queueOwnerAWSAccountId)
client - connectionqueueName - Name of the queue whose URL must be fetchedqueueOwnerAWSAccountId - AWS account ID of the owner that created the queue@Throws(value=CommonErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<List<String>,RequestIDAttribute> listDeadLetterSourceQueues(@Config SQSConfiguration config, @Connection SQSConnection client, @Summary(value="Queue URL of a dead-letter queue. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionqueueUrl - Queue URL of a dead-letter queue.
This parameter is optional and if you do not specify queueUrl you need to set
in the configuration level Default Global Queue URL.@Throws(value=CommonErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<List<String>,RequestIDAttribute> listQueues(@Connection SQSConnection client, @Optional String queueNamePrefix)
client - connectionqueueNamePrefix - String to use for filtering the list results. Only those queues whose name begins with the specified string are returned.@MediaType(value="text/plain") @Throws(value=PurgeQueueErrorTypeProvider.class) public String purgeQueue(@Config SQSConfiguration config, @Connection SQSConnection client, @Summary(value="Queue URL where messages are to be fetched from. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionqueueUrl - Queue URL where messages are to be fetched from.
This parameter is optional and if you do not specify queueUrl you need to set
in the configuration level Default Global Queue URL.@MediaType(value="text/plain") @Throws(value=CommonErrorTypeProvider.class) public String removePermission(@Config SQSConfiguration config, @Connection SQSConnection client, String label, @Summary(value="Permissions will be deleted from the queue represented by this URL This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionlabel - Name for the permission to be removedqueueUrl - Permissions will be deleted from the queue represented by this URL.@Throws(value=LargePayloadErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<SendMessageResult,RequestIDAttribute> sendMessage(@Config SQSConfiguration config, @Connection SQSConnection client, @Content Message message, @Summary(value="Queue where the message is to be sent. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionmessage - Message to sendqueueUrl - Queue where the message is to be sent.@Throws(value=LargePayloadErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<BatchResult,RequestIDAttribute> sendMessageBatch(@Config SQSConfiguration config, @Connection SQSConnection client, @Content List<Message> messages, @Summary(value="Queue where the message is to be sent. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionqueueUrl - Queue where the message is to be sent.messages - List of SendMessageBatchRequestEntry items@MediaType(value="text/plain") @Throws(value=CommonErrorTypeProvider.class) public String setQueueAttributes(@Config SQSConfiguration config, @Connection SQSConnection client, @Content Map<String,String> attributes, @Summary(value="URL of the queue This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configuration.client - connectionattributes - Map of attributes to setqueueUrl - URL of the queue.@Throws(value=CommonErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<Integer,RequestIDAttribute> getApproximateNumberOfMessages(@Config SQSConfiguration config, @Connection SQSConnection client, @Summary(value="URL of the queue. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl)
config - configurationclient - connectionqueueUrl - URL of the queue.@Throws(value=ReadErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<List<Message>,RequestIDAttribute> read(@Config SQSConfiguration config, @Connection SQSConnection client, @Summary(value="Queue URL. This parameter is optional and if you do not specify queueUrl you need to set in the configuration level Default Global Queue URL.") @Optional String queueUrl, @Summary(value="Maximum duration of a single poll, in seconds. Valid values are from 0 to 20. Use 0 for short polling.") @Placement(tab="Advanced") @DisplayName(value="Wait time") @ConfigOverride int waitTime, int maxNumberOfMessages)
config - The config.client - The connectionqueueUrl - URL of the queue.waitTime - Maximum duration of a single poll, in seconds.
maxNumberOfMessages - Maximum number of messages to readCopyright © 2022 MuleSoft, Inc.. All rights reserved.