# mulesoft Amazon SQS Connector - Full Documentation
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Amazon SQS Connector 5.12
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector for Amazon SQS (Amazon SQS Connector) provides an easy way to interface with the
Amazon Simple Queue Service (Amazon SQS) API, enabling Mule users to manage SQS queueing services
without having to interact with the API directly.
Amazon SQS offers a reliable, highly scalable hosted queue for storing messages as they travel
between computers. You can use Amazon SQS to move data between distributed application components
and perform different tasks without losing messages or requiring each component to be always
available. Amazon SQS makes it easy to build an automated workflow that works closely with Amazon
Elastic Compute Cloud (Amazon EC2) and other AWS infrastructure web services.
The AWS SDK for Java provides a Java API for AWS infrastructure services. Amazon SQS Connector is
built using the SDK for Java.
For compatibility information and fixed issues, see the Amazon SQS Connector Release Notes.
## Grant Amazon SQS API Permissions to Perform Actions
To use Amazon SQS Connector, you must first configure your AWS user to operate an AWS resource. For
the configuration, you must grant API permissions to perform Amazon SQS actions, which enables you
to set up access control and write permissions policies that you can attach to an IAM identity.
Refer to
[Amazon SQS API permissions](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-api-permissions-reference.html)
documentation for details.
## Cluster Mode
Amazon SQS Connector supports listening for messages on the primary node only or on all nodes when
running in cluster mode. For information, see
[Receiving Messages in Cluster Mode](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-config-topics#node-behavior).
## Queue Support
Amazon SQS Connector provides support for two types of queues:
- Standard Queues
Standard queues have high throughput. However, using these queues can occasionally result in
having duplicate copies of messages delivered out of order.
- FIFO Queues
FIFO (First-In-First-Out) queues deliver messages in the order in which they are sent. However,
these queues have limited throughput.
For information about creating FIFO queues, see
[Additional Configuration Topics](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-config-topics).
## Before You Begin
Before creating an app, you must:
- Have access to the Amazon SQS target resource and Anypoint Platform
- Understand how to create a Mule app using Anypoint Studio
- Have AWS Identity and Access Management (IAM) credentials
## Common Use Cases for the Connector
Common use cases for Amazon SQS Connector include:
- **Queue Messaging**
Send messages to a queue and retrieve messages from a queue.
- **Asynchronous Processing Patterns**
Improve reliability of loosely-coupled architecture by implementing asynchronous messaging that
buffers incoming payloads for consumption at the pace of the consuming services.
- **Microservice Decoupling**
Build a set of loosely coupled systems that can evolve independently and flexibly by implementing
a one-way messaging pattern or a request-response messaging.
- **Workload Distribution**
For large workload distribution, maintain a queue of all tasks, efficiently distribute the tasks
between the machines or the functions doing the work, and guarantee that every part of the work is
only done once.
- **Batch Job Scheduling**
Maintain a queue of jobs, handle retries, track job status, and so on.
For examples of these use cases, refer to
[Amazon SQS Connector Examples](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-examples).
## Authentication Types
Amazon SQS Connector connections use the following authentication types:
- Basic
Uses a session token provided by Amazon STS to connect to Amazon SQS
- Role
Uses the Amazon role ARN that uniquely identifies the role to assume to allow cross-account access
## Next Step
After you complete the prerequisites and experiment with examples, you are ready to create an app
with [Anypoint Studio](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-studio).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange)
- [Amazon SQS Connector on Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-amazon-sqs-connector/)
- [Salesforce Help](https://help.salesforce.com)
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Amazon SQS Connector 5.12 Additional Configuration Information
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Configure additional functionality such as controlling polling behavior globally and locally,
receiving messages on the primary node only, creating the FIFO queue, and managing large payloads.
## Control Polling Behavior
Since version 5.9, the default behavior of the Receive Messages source and the Read operation is to
use long polling:
- With long polling, SQS Connector returns the query results as soon as possible, if any messages
are present.
Otherwise, SQS Connector waits the specified amount of seconds before returning an empty response.
- With short polling, SQS Connector always returns the query results as soon as possible, even if
that means returning an empty response.
Long polling can reduce the number of network requests without affecting the throughput.
You can control polling behavior either globally or at the individual source and operation level.
### Control Polling Behavior Globally
To control polling behavior globally, use the Default Wait Time field on the Advanced tab of the
global element configuration screen for the Receive Messages source, Read operation, or both:
- Set this field to a value between `1` and `20` to use long polling. With long polling, if there
are messages available immediately, the connector returns the query results immediately. If not,
the connector waits up to the specified amount of seconds for a message to be added before
returning an empty response.
- Set this field to `0` to use short polling. With short polling, the connector always returns the
query results as soon as possible, even if that means returning an empty response.
In the following screenshot, the Default Wait Time field is set to `20`. This value directs the
connector to use long polling and to wait 20 seconds before returning an empty response.

### Control Polling Behavior Locally
To control polling behavior locally, use the Wait Time field on the Advanced tab of the Receive
Messages source properties window, the Read operation properties window, or both.
## Receive Messages on the Primary Node Only
The default behavior of the Receive Messages source is to receive messages on all nodes when running
in cluster mode.
If you want the app to receive messages on the primary node only:
1. In Studio, select the **Receive Messages** source for your flow.
2. On the **Advanced** sub-tab of the **Receive messages** tab, select the **Primary node only**
checkbox:

The multi-node cluster behavior depends on the selected SQS queue type. When using the Standard
queue, SQS guarantees that a message is delivered at least once. However, duplicate messages might
be introduced in the queue. To avoid duplication of messages in the queue, you can use a FIFO
(First-In-First-Out) queue to ensure that a message is delivered only once and that it remains
available until a consumer processes and deletes it.
For more information about queue types, see
[AWS SQS Standard Queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html)
and
[AWS SQS FIFO Queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/).
## Create the FIFO Queue
FIFO queues deliver messages in the order in which they are sent.
To create the FIFO queue, use the **Create queue** operation in the connector, and set the
**FifoQueue** and **ContentBasedDeduplication** field values to `true`.
End the **queue name** value with the `.fifo` extension, for example:
`MyTestFIFOQueue.fifo`.
When you create the FIFO queues, select any of the 15 regions that Amazon supports.
When you use Amazon SQS Connector to send messages to the FIFO queue, use the same queue URL and
region name that you used when creating the FIFO queue. You must also provide a value for the
attribute `message group id` in the connector configuration while sending messages.
## Manage Large Payloads
To enable support for managing large message payloads in Amazon SQS Connector, follow these steps:
1. In Studio, click the **Global Elements tab** at the base of the canvas.
2. Select the **Amazon SQS Configuration** you previously created and click **Edit**.
3. In the **Connection** section, click the **Advanced** tab.
4. In the **Large Payload Support** field, choose either:
- **Expression or Bean Reference**
- **Edit Inline**

5. Configure the parameters as follows:
| Field | Description |
|---|
Bucket | Name of the bucket to use for storing large message payloads. The bucket must already be created and configured in AWS S3. Enabling this feature incurs additional charges for using AWS S3. |
Message Size Threshold | Message size threshold value for storing message payloads in the AWS S3 bucket. The default value for message size threshold is 256 KB and the maximum threshold size value is 256KB. The maximum message size is 2GB. |
Message Size Threshold Unit | Represents the data unit for the message size threshold. |
After you specify the values for these fields, Amazon SQS Connector is ready to manage large
payload messages and store them automatically in the specified AWS S3 bucket when the message
size threshold value is exceeded.
For an example of sending and receiving messages with large payload messages, see
[Send and Receive Large Messages Example](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-examples#send-and-receive-large-messages).
## Next
After you create the FIFO queue, you can try the
[Amazon SQS Connector Examples](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-examples).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Amazon SQS Connector 5.12 Examples
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
The following examples show several Mule flows for Amazon SQS Connector:
- [Send and Receive Messages](#send-and-receive-messages)
- [Send and Receive Large Messages](#send-and-receive-large-messages)
## Send and Receive Messages
This example sends a message with metadata to an Amazon SQS queue and then receives the message from
the queue. The example contains two flows:
- The first flow sends a message with metadata and gets the count of the messages in the queue to
validate that the message was sent.
- The second flow receives the message and logs the message body.

### Configure the First Flow
Configure the first flow that sends a message to the queue. Creating the first flow involves
configuring a **Listener** component, a **Transform Message** component, a **Send message**
operation, a **Logger** component, a **Get approximate number of messages** operation, and a second
**Logger** component.
#### Configure the HTTP Listener
Configure the **Listener** component to initiate a Mule flow when a call is made to the `/` path:
1. Create a new Mule project in Studio.
2. From the **Mule Palette** view, select **HTTP** and drag the **Listener** component to the
canvas.
3. In the properties window, click **+** next to the **Connector configuration** field to add a
global element.
4. Accept the defaults.
5. In the properties window, set the **Path** field value to `/`.
#### Add the Transform Message Component
Add the **Transform Message** component to attach the metadata and convert the values from the HTTP
input form to Java format so they can be used as input to the **Send message** operation:
1. From the **Mule Palette** view, select **Core** and drag a **Transform Message** component to
the right of **Listener**.
2. In the properties window, overlay the brackets in the **Output** section with this DataWeave
code:
```dataweave
%dw 2.0
output application/java
---
{
delaySeconds: 0,
body: "Hello World",
messageAttributes: {
"AccountId": {
"stringValue" : "000123456",
"dataType" : "String.AccountId"
} as Object {
class: "org.mule.extension.sqs.api.model.MessageAttributeValue"
},
"NumberId": {
"stringValue" : "230.000000000000000001",
"dataType" : "Number"
} as Object {
class : "org.mule.extension.sqs.api.model.MessageAttributeValue"
}
} as Object {
class: "java.util.HashMap"
}
} as Object {
class: "org.mule.extension.sqs.api.model.Message"
}
```
#### Add the Send Message Operation
Add the **Send message** operation to send the message to the specified queue:
1. From the **Mule Palette** view, select **Amazon SQS** and drag the **Send message** operation to
the right of **Transform Message**.
2. In the properties window, click **+** next to the **Connector configuration** field to add a
global element.
3. Configure the global element as follows:
| Field | Value |
|---|
Name | Name used to reference the configuration. |
Session Token | Session token used to validate the temporary security credentials. |
Access Key | Alphanumeric text string that uniquely identifies the user who owns the account. |
Secret Key | Key that acts as a password. |
Region Endpoint | Queue region. |
SQS Endpoint | SQS endpoint for Amazon VPC support. |
Default Global Queue URL | Default Amazon SQS queue URL credentials. |
The following image shows an example of the **Send Message** configuration of the global
element:

4. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the connector operation. |
Connector configuration | Global configuration you just created. |
Message | payload
|
Queue url | Amazon SQS queue URL. If provided, the value of this field takes precedence over the value of the Default Global Queue URL field on the Global Configuration Elements window. |
The following image shows an example of the **Send Message** configuration in the properties
window:

#### Add the First Logger Component
Add the first **Logger** component to display the response in the Mule console:
1. From the **Mule Palette** view, select **Core** and drag a **Logger** component to the right of
**Send message**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the logger, such as Log Response. |
Message | Sent Message: `#[payload]`
|
Level | INFO (Default) |
The following image shows an example of the **Logger** configuration in the properties window:

#### Add the Get Approximate Number of Messages Operation
Add the **Get approximate number of messages** operation to obtain the number of messages in the
queue:
1. From the **Mule Palette** view, select **Amazon SQS** and drag the **Get approximate number of
messages** operation to the right of **Logger**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the connector operation. |
Connector configuration | Global configuration you just created. |
Queue url | ${sqs.queueUrl}
|
The following image shows an example of the **Get approximate number of messages** configuration
in the properties window:

#### Add the Second Logger Component
Add the second **Logger** component to display the message count in the Mule console:
1. From the **Mule Palette** view, select **Core** and drag a **Logger** component to the right of
**Get approximate number of messages**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the logger, such as Log Count. |
Message | Sent Message: `#[payload]`
|
Level | INFO (Default) |
The following image shows an example of the **Logger** configuration in the properties window:

### Configure the Second Flow
Configure the second flow that receives and logs the messages before the messages are deleted from
the queue. Creating the second flow involves configuring a **Receive messages** source and a
**Logger** component.
#### Add the Receive Messages Source
Add the **Receive messages** source to retrieve messages:
1. From the **Mule Palette** view, select **Amazon SQS** and drag the **Receive messages** source
to the canvas.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the connector operation. |
Connector configuration | Global configuration you just created. |
Number of messages | 1
|
Queue url | Amazon SQS queue URL. If provided, the value of this field takes precedence over the value of the Default Global Queue URL field on the Global Configuration Elements window. |
The following image shows an example of the **Receive messages** configuration in the properties
window:

#### Add the Logger Component
Add the **Logger** component to display the message in the Mule console:
1. From the **Mule Palette** view, select **Core** and drag a **Logger** component to the right of
**Receive messages**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the logger, such as Log Receipt. |
Message | `#[payload]`
|
Level | INFO (Default) |
The following image shows an example of the **Logger** configuration in the properties window:

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
## Send and Receive Large Messages
> [!NOTE] Enabling this feature incurs additional charges associated with using AWS S3.
This example sends a large message with metadata to an Amazon SQS queue that references the AWS S3
bucket to use for storing large message payloads, and then receives the large message from the
queue. The example contains two flows:
- The first flow sends a large message with metadata and gets the count of the messages in the queue
to validate that the large message was sent.
- The second flow receives the large message and logs the message body.

### Before You Begin
Before you begin, you must have:
- Access to the Amazon SQS target resource and Anypoint Platform
- A file containing a payload larger than 256 KB
- An AWS S3 bucket created on AWS S3 to use for storing the large payload messages
- AWS Identity and Access Management (IAM) credentials
### Configure the First Flow
Configure the first flow that sends a large message to the queue. Creating the first flow involves
configuring a **Listener** component, a **Read** operation, a **Transform Message** component, a
**Send Message** operation, a **Logger** component, a **Get approximate number of messages**
operation, and a second **Logger** component.
#### Configure the HTTP Listener
Configure the **Listener** component to initiate a Mule flow when a call is made to the
`/largePayload` path:
1. Create a new Mule project in Studio.
2. From the **Mule Palette** view, select **HTTP** and drag the **Listener** component to the
canvas.
3. In the properties window, click **+** next to the **Connector configuration** field to add a
global element.
4. Accept the defaults.
5. In the properties window, set the **Path** field value to `/largePayload`.
#### Add the Read Operation
Add the **Read** operation to read the large payload:
1. From the **Mule Palette** view, select **File** and drag the **Read** operation to the right of
**Listener**.
2. In the properties window, click **+** next to the **Connector configuration** field to add a
global element.
3. Select the **Connection** checkbox.
4. In **Working Directory**, enter the directory that will serve as the root directory for every
relative path used with this connector.
The default is your user home directory.
In this example, the file is read from `src/main/resources` of the Mule application:

5. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the connector operation. |
Connector configuration | Global configuration you just created. |
File Path | Path to the file to read. |
The following image shows an example of the **Read** configuration in the properties window:

#### Add the Transform Message Component
Add the **Transform Message** component to attach the metadata and convert the values from the HTTP
input form to Java format so they can be used as input to the **Send message** operation:
1. From the **Mule Palette** view, select **Core** and drag a **Transform Message** component to
the right of **Read**.
2. In the properties window, overlay the brackets in the **Output** section with this DataWeave
code:
```dataweave
%dw 2.0
output application/java
---
{
delaySeconds: 0,
body: "Hello World",
messageAttributes: {
"AccountId": {
"stringValue" : "000123456",
"dataType" : "String.AccountId"
} as Object {
class: "org.mule.extension.sqs.api.model.MessageAttributeValue"
},
"NumberId": {
"stringValue" : "230.000000000000000001",
"dataType" : "Number"
} as Object {
class : "org.mule.extension.sqs.api.model.MessageAttributeValue"
}
} as Object {
class: "java.util.HashMap"
}
} as Object {
class: "org.mule.extension.sqs.api.model.Message"
}
```
#### Add the Send Message Operation
Add the **Send message** operation to send the large message to the specified queue:
1. From the **Mule Palette** view, select **Amazon SQS** and drag the **Send message** operation to
the right of **Transform Message**.
2. In the properties window, click **+** next to the **Connector configuration** field to add a
global element.
3. Configure the global element as follows:
| Field | Value |
|---|
Name | Name used to reference the configuration. |
Session Token | Session token used to validate the temporary security credentials. |
Access Key | Alphanumeric text string that uniquely identifies the user who owns the account. |
Secret Key | Key that acts as a password. |
Region Endpoint | Queue region. |
SQS Endpoint | SQS endpoint for Amazon VPC support. |
Default Global Queue URL | Default Amazon SQS queue URL credentials. |
The following image shows an example of the **Send Message** configuration of the global
element:

4. In the **Connection** section, click the **Advanced** tab.
5. In the **Large Payload Support** field, select one of the following:
- **Expression or Bean reference**
- **Edit inline**
Configure the fields as follows:
| Field | Value |
|---|
Bucket | Name of the AWS S3 bucket to use for storing large message payloads. The bucket must already be created and configured in AWS S3. Enabling this feature incurs additional charges for using AWS S3. |
Message Size Threshold | Message size threshold for storing message payloads in the AWS S3 bucket. The default value for message size threshold is 256 KB and the maximum threshold size value is 256 KB. The maximum message size is 2 GB. |
Message Size Threshold Unit | Data unit for the message size threshold. |
Custom S3 Endpoint | Amazon S3 endpoint URL for VPC support. |
The following image shows an example of the **Large Payload Support** fields configuration:

6. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the connector operation. |
Connector configuration | Global configuration you just created. |
Message | payload
|
Queue url | Amazon SQS queue URL. If provided, the value of this field takes precedence over the value of the Default Global Queue URL field on the Global Configuration Elements window. |
The following image shows an example of the **Send Message** configuration in the properties
window:

#### Add the First Logger Component
Add the first **Logger** component to display the response in the Mule console:
1. From the **Mule Palette** view, select **Core** and drag a **Logger** component to the right of
**Send message**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the logger, such as Log Response. |
Message | Sent Message: `#[payload]`
|
Level | INFO (Default) |
The following image shows an example of the **Logger** configuration in the properties window:

#### Add the Get Approximate Number of Messages Operation
Add the **Get approximate number of messages** operation to obtain the number of messages in the
queue:
1. From the **Mule Palette** view, select **Amazon SQS** and drag the **Get approximate number of
messages** operation to the right of **Logger**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the connector operation. |
Connector configuration | Global configuration you just created. |
Queue url | ${sqs.queueUrl}
|
The following image shows an example of the **Get approximate number of messages** configuration
in the properties window:

#### Add the Second Logger Component
Add the second **Logger** component to display the message count in the Mule console:
1. From the **Mule Palette** view, select **Core** and drag a **Logger** component to the right of
**Get approximate number of messages**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the logger, such as Log Count. |
Message | Sent Message: `#[payload]`
|
Level | INFO (Default) |
The following image shows an example of the **Logger** configuration in the properties window:

### Configure the Second Flow
Configure the second flow that receives and logs the large messages before the large messages are
deleted from the queue. Creating the second flow involves configuring a **Receive messages** source
and a **Logger** component.
#### Add the Receive Messages Source
Add the **Receive messages** source to retrieve large messages:
1. From the **Mule Palette** view, select **Amazon SQS** and drag the **Receive messages** source
to the canvas.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the connector operation. |
Connector configuration | Global configuration you just created. |
Number of messages | 1
|
Queue url | Amazon SQS queue URL. If provided, the value of this field takes precedence over the value of the Default Global Queue URL field on the Global Configuration Elements window. |
The following image shows an example of the **Receive messages** configuration in the properties
window:

#### Add the Logger Component
Add the **Logger** component to display the large message in the Mule console:
1. From the **Mule Palette** view, select **Core** and drag a **Logger** component to the right of
**Receive messages**.
2. In the properties window, configure the following fields:
| Field | Value |
|---|
Display Name | Name for the logger, such as Log Receipt. |
Message | `#[payload]`
|
Level | INFO (Default) |
The following image shows an example of the **Logger** configuration in the properties window:

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Amazon SQS Connector 5.12 Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
> [!NOTE] Where possible, we changed noninclusive terms to align with our company value of Equality.
> We maintained certain terms to avoid any effect on customer implementations.
Anypoint Connector for Amazon SQS (Amazon SQS Connector) enables you to interface with the Amazon
Simple Queue Service (Amazon SQS) API and manage SQS queueing services without having to interact
with the Amazon SQS API directly.
## Configuration
Default Configuration for Amazon SQS Connector.
| Name | Type | Description | Default Value | Required |
|---|
Name | | Name for this configuration. Connectors reference the configuration with this name. | | |
Connection | | Connection types for this configuration. | | |
Default Global Queue URL | | This value is used when you do not set the queue URL at the operation level. If you do not specify the queue URL here or at the operation level, an exception is thrown. A queue URL is constructed in the following format: https://sqs.{REGION}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME}, for example: https://sqs.us-east-1.amazonaws.com/123456789101/test-queue. | | |
Default Wait Time | | Default value for the maximum duration of a single poll, in seconds: Set this field to a value between 1 and 20 to use long polling. With long polling, if there are messages available immediately, the connector returns the query results immediately. If not, the connector waits up to the specified amount of seconds for a message to be added before returning an empty response. Set this field to 0 to use short polling. With short polling, the connector always returns the query results as soon as possible, even if that means returning an empty response.
| | |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
### Basic Connection Type
Uses a session token provided by Amazon STS to connect to Amazon SQS.
| Name | Type | Description | Default Value | Required |
|---|
Session Token | | Session token provided by Amazon STS. | | |
Test Queue ARN | | Use this parameter to test the connection to Amazon SQS Connector. If you do not specify this parameter, the test connection is not performed. A queue ARN is constructed in the following format: arn:aws:{REGION}:{ACCOUNT_NUMBER}:{QUEUE_NAME}, for example: arn:aws:sqs:us-east-1:123456789101:test-queue. | | |
Large Payload Support | | Support large message payloads on Amazon SQS. | | |
Connection Timeout | | How long the connector waits before timing out when establishing a connection to the remote service. A value of 0 means infinity and is not recommended. | | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Timeout field. | | |
Max Connections | | Sets the maximum number of allowed open HTTP connections. | | |
Socket Timeout | | How long to wait for data to be transferred over an established, open connection before the connection times out. A value of 0 means infinity and is not recommended. | | |
Socket Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Socket Timeout field. | | |
Access Key | | Access key provided by Amazon. | | |
Secret Key | | Secret key provided by Amazon. | | |
Try Default AWSCredentials Provider Chain | | Set this field to true to obtain credentials from the AWS environment. Refer to Using Credentials. | | |
Region Endpoint | | Sets the topic region endpoint. | | |
Custom SQS Endpoint | | Sets a custom SQS endpoint. Use this parameter when a non-standard service endpoint is required, such as a Virtual Private Cloud (VPC) endpoint. | | |
TLS Configuration | | Configures TLS. If using the HTTPS protocol, you must configure TLS. | | |
Reconnection | | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | | |
Host | | | | |
Port | | | | |
Username | | | | |
Password | | | | |
Domain | | | | |
Workstation | | Optional proxy workstation. | | |
### Role Connection Type
Configures the Amazon role ARN that uniquely identifies the role to assume to allow cross-account
access.
| Name | Type | Description | Default Value | Required |
|---|
Role ARN | | Role ARN that uniquely identifies the role to assume to gain cross-account access. | | |
External ID | | A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provides an external ID, then provide that value in this field. | | |
Test Queue ARN | | Use this parameter to test the connection to Amazon SQS Connector. If you do not specify this parameter, the test connection is not performed. A queue ARN is constructed in the following format: arn:aws:{REGION}:{ACCOUNT_NUMBER}:{QUEUE_NAME}, for example: arn:aws:sqs:us-east-1:123456789101:test-queue. | | |
Large Payload Support | | Support large message payloads on Amazon SQS. | | |
Connection Timeout | | How long the connector waits before timing out when establishing a connection to the remote service. A value of 0 means infinity and is not recommended. | | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Timeout field. | | |
Max Connections | | Sets the maximum number of allowed open HTTP connections. | | |
Socket Timeout | | How long to wait for data to be transferred over an established, open connection before the connection times out. A value of 0 means infinity and is not recommended. | | |
Socket Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Socket Timeout field. | | |
Access Key | | Access key provided by Amazon. | | |
Secret Key | | Secret key provided by Amazon. | | |
Try Default AWSCredentials Provider Chain | | Set this field to true to obtain credentials from the AWS environment. Refer to Using Credentials. | | |
Region Endpoint | | Sets the topic region endpoint. | | |
Custom STS Endpoint | | Sets a custom STS endpoint. Use this parameter when a non-standard service endpoint is required, such as a Virtual Private Cloud (VPC) endpoint. The custom STS endpoint might not work if DefaultAWSCredentialsProviderChain is used. Instead, use AWS environment variables such as AWS_STS_REGIONAL_ENDPOINTS, AWS_REGION, and AWS_ENDPOINT_URL. | | |
Custom SQS Endpoint | | Sets a custom SQS endpoint. Use this parameter when a non-standard service endpoint is required, such as a Virtual Private Cloud (VPC) endpoint. | | |
TLS Configuration | | Configures TLS. If using the HTTPS protocol, you must configure TLS. | | |
Reconnection | | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | | |
Host | | | | |
Port | | | | |
Username | | | | |
Password | | | | |
Domain | | | | |
Workstation | | Optional proxy workstation. | | |
## Sources
- [Receive messages](#receivemessages)
### Receive messages
``
Retrieves one or more messages from a server but triggers a flow for each message separately.
> [!NOTE] In Amazon SQS Connector 5.12.5 and later, the **Receive messages** source performs initial
> validation of the queue URL. If the validation fails, the source stops running. To enable queue
> URL validation, ensure that the IAM role includes an additional policy granting the
> `sqs:GetQueueAttributes` permission.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Visibility Timeout | | Period of time during which other consumers are prevented from receiving and processing the same message in the queue. | | |
Visibility Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Visibility Timeout field. | | |
Preserve Messages | | Preserve messages after they are read rather than deleting them immediately from the queue after they are read. | | |
Number Of Messages | | Number of messages to retrieve on each call. The maximum is 10. | | |
Queue Url | | URL of the queue in which to receive messages. | | |
Wait time | | Maximum duration of a single poll, in seconds: Set this field to a value between 1 and 20 to use long polling. With long polling, if there are messages available immediately, the connector returns the query results immediately. If not, the connector waits up to the specified amount of seconds for a message to be added before returning an empty response. Set this field to 0 to use short polling. With short polling, the connector always returns the query results as soon as possible, even if that means returning an empty response.
| | |
Number of consuming threads | | Number of threads used to consume the messages in the inbound flow. This value must be an integer greater than 0. | | |
Primary Node Only | | Determines whether to execute this source on only the primary node when running Mule instances in a cluster. | | |
Frequency | | Frequency at which the connector polls for incoming messages, in the time unit specified in the Time unit field. If you set this value to 0, the connector polls as fast as possible. | | |
Start delay | | Amount of time that the connector waits before it starts polling for incoming messages, in the time unit specified in the Time unit field. The default value of 0 means that the connector starts polling immediately. | | |
Time unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Frequency and Start delay fields. | | |
Redelivery Policy | | Defines a policy for processing the redelivery of the same message. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
## Operations
- [Add Permission](#addPermission)
- [Change Message Visibility](#changeMessageVisibility)
- [Change Message Visibility Batch](#changeMessageVisibilityBatch)
- [Create Queue](#createQueue)
- [Delete Message](#deleteMessage)
- [Delete Message Batch](#deleteMessageBatch)
- [Delete Queue](#deleteQueue)
- [Get Approximate Number Of Messages](#getApproximateNumberOfMessages)
- [Get Queue Attributes](#getQueueAttributes)
- [Get Queue Url](#getQueueUrl)
- [List Dead Letter Source Queues](#listDeadLetterSourceQueues)
- [List Queues](#listQueues)
- [Purge Queue](#purgeQueue)
- [Read](#read)
- [Remove Permission](#removePermission)
- [Send Message](#sendMessage)
- [Send Message Batch](#sendMessageBatch)
- [Set Queue Attributes](#setQueueAttributes)
### Add Permission
``
Adds a permission to a message queue.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Label | | Name for this permission. | | |
Account Ids | | IDs of the AWS accounts to share this queue with. | | |
Actions | | List to indicate how much to share (Send Message, Receive Message, Change Message Visibility, Delete Message, and Get Queue Attributes). | | |
Queue Url | | URL of the queue in which to add permissions to. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:OVER\_LIMIT
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Change Message Visibility
``
Changes the visibility timeout of a specified message in a queue to a new value, not to exceed 12
hours.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Receipt Handle | | Receipt handle associated with the message whose visibility timeout must change. | | |
Visibility Timeout | | New value of the message visibility timeout (up to 4300 seconds or 12 hours). | | |
Visibility Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Visibility Timeout field. | | |
Queue Url | | URL of the queue to act on. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:MESSAGE\_NOT\_IN\_FLIGHT
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
- SQS:OPT\_IN\_REQUIRED
- SQS:PARAMETER\_OUT\_OF\_RANGE
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:S3\_BUCKET\_ACCESS\_DENIED
- SQS:S3\_BUCKET\_NOT\_FOUND
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Change Message Visibility Batch
``
Changes the visibility timeout of up to 10 ChangeMessageVisibility requests, with each result
reported individually in the response.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Receipt Handles | | List of receipt handles of the messages for which the visibility timeout must be changed. | | |
Queue Url | | URL of the queue to act on. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
- SQS:OPT\_IN\_REQUIRED
- SQS:PARAMETER\_OUT\_OF\_RANGE
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:S3\_BUCKET\_ACCESS\_DENIED
- SQS:S3\_BUCKET\_NOT\_FOUND
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Create Queue
``
Creates a new queue or returns the URL of an existing one.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Name | | Name of the queue to create. | | |
Attributes | | Map of attributes with their corresponding values. Refer to the Queue Attributes table below. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Queue Attributes
| Name | Type | Description | Default Value | Required |
|---|
DelaySeconds | | Length of time, in seconds, for which the delivery of all messages in the queue is delayed. Valid values are an integer from 0 to 900 seconds (15 minutes). | | |
MaximumMessageSize | | Limit of how many bytes a message can contain before Amazon SQS rejects it. Valid values are an integer from 1024 bytes (1 KiB) to 262,144 bytes (256 KiB). | | |
MessageRetentionPeriod | | Length of time, in seconds, for which Amazon SQS retains a message. Valid values are an integer from 60 seconds (1 minute) to 1,209,600 seconds (14 days). | | |
Policy | | Queue’s policy. A valid AWS policy. | | |
ReceiveMessageWaitTimeSeconds | | Length of time, in seconds, for which a ReceiveMessage action waits for a message to arrive. Valid values are an integer from 0 to 20 (seconds). | | |
RedrivePolicy | | String that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object. | | |
VisibilityTimeout | | Visibility timeout for the queue, in seconds. Valid values are an integer from 0 to 43,200 (12 hours). | | |
KmsDataKeyReusePeriodSeconds | | Length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. Valid values are an integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). | | |
FifoQueue | | Designates a queue as FIFO. Valid values are true or false. If you don’t specify this attribute, Amazon SQS creates a standard queue. You must provide this attribute during queue creation, and you can’t change it for an existing queue. When you set this attribute, you must also explicitly provide the MessageGroupId for your messages. | | |
ContentBasedDeduplication | | Enables content-based deduplication. Valid values are true or false. Every message must have a unique MessageDeduplicationId. | | |
ApproximateNumberOfMessages | | Approximate number of messages available for retrieval from the queue. | | |
ApproximateNumberOfMessagesDelayed | | 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 | | 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 | | Time when the queue was created, in seconds. | | |
LastModifiedTimestamp | | Time when the queue was last changed, in seconds. | | |
QueueArn | | Amazon resource name (ARN) of the queue. | | |
#### Redrive Policy
| Name | Type | Description | Default Value | Required |
|---|
deadLetterTargetArn | | Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount is exceeded. | | |
maxReceiveCount | | 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. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:QUEUE\_ALREADY\_EXISTS
- SQS:QUEUE\_DELETED\_RECENTLY
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Delete Message
``
Deletes the message identified by the message object in the queue.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Receipt Handle | | Receipt handle of the message to delete. | | |
Queue Url | | URL of the queue. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
- SQS:OPT\_IN\_REQUIRED
- SQS:PARAMETER\_OUT\_OF\_RANGE
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:S3\_BUCKET\_ACCESS\_DENIED
- SQS:S3\_BUCKET\_NOT\_FOUND
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Delete Message Batch
``
Deletes up to 10 messages from the specified queue. This is a batch version of **Delete Message**.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Entries | | List of receipt handles for the messages to delete. | | |
Queue Url | | URL of the queue to delete messages as a batch from. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
- SQS:OPT\_IN\_REQUIRED
- SQS:PARAMETER\_OUT\_OF\_RANGE
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:S3\_BUCKET\_ACCESS\_DENIED
- SQS:S3\_BUCKET\_NOT\_FOUND
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Delete Queue
``
Deletes the message queue represented by this object and can even delete a non-empty queue. Because
deleting a queue can take up to 60 seconds, wait at least that long before you create a new queue
with the same name.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Url | | URL of the queue to delete. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Get Approximate Number Of Messages
``
Retrieves an approximate number of visible messages for a queue.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Url | | | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | Number |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Get Queue Attributes
``
Shows queue attributes to expose the underlying functionality.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Attribute Names | | List of attributes to retrieve information for. | | |
Queue Url | | URL of the queue to take action on. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | Object |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Get Queue Url
``
Returns the URL of an existing queue.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Name | | Name of the queue whose URL must be fetched. | | |
Queue Owner AWS Account Id | | AWS account ID of the owner that created the queue. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### List Dead Letter Source Queues
``
Returns a list of the queues that have the Redrive Policy queue attribute configured with a
dead-letter queue.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Url | | URL of a dead-letter queue. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | Array of String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### List Queues
``
Returns a list of your queues. The maximum number of queues that can be returned is 1000.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Name Prefix | | String to use for filtering the list results. Queues only with names beginning with the specified string are returned. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | Array of String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Purge Queue
``
Deletes the messages in a queue specified by the queue URL.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Url | | URL of the queue from which messages are fetched. This parameter is optional and if unspecified, you must specify the Default Global Queue URL at the configuration level. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:PURGE\_QUEUE\_IN\_PROGRESS
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Read
``
Reads a number of messages from a queue.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Queue Url | | | | |
Max Number Of Messages | | Maximum number of messages to read. | | |
Wait time | | Maximum duration of a single poll, in seconds: Set this field to a value between 1 and 20 to use long polling. With long polling, if there are messages available immediately, the connector returns the query results immediately. If not, the connector waits up to the specified amount of seconds for a message to be added before returning an empty response. Set this field to 0 to use short polling. With short polling, the connector always returns the query results as soon as possible, even if that means returning an empty response.
| | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | Array of Message |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
- SQS:OPT\_IN\_REQUIRED
- SQS:OVER\_LIMIT
- SQS:PARAMETER\_OUT\_OF\_RANGE
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:S3\_BUCKET\_ACCESS\_DENIED
- SQS:S3\_BUCKET\_NOT\_FOUND
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Remove Permission
``
Removes a permission from this message queue.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Label | | Name for the permission to remove. | | |
Queue Url | | URL of the queue in which permissions are deleted from. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Send Message
``
Sends a message to a specified queue. The message must be between 1 and 256K bytes long.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Message | | | | |
Queue Url | | URL of the queue in which to send the message. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
- SQS:OPT\_IN\_REQUIRED
- SQS:PARAMETER\_OUT\_OF\_RANGE
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:S3\_BUCKET\_ACCESS\_DENIED
- SQS:S3\_BUCKET\_NOT\_FOUND
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Send Message Batch
``
Delivers up to 10 messages to the specified queue. This is a batch version of **Send Message**.
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Messages | | | | |
Queue Url | | URL of the queue in which to send the message. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
- SQS:OPT\_IN\_REQUIRED
- SQS:PARAMETER\_OUT\_OF\_RANGE
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:S3\_BUCKET\_ACCESS\_DENIED
- SQS:S3\_BUCKET\_NOT\_FOUND
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
### Set Queue Attributes
``
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).
| Name | Type | Description | Default Value | Required |
|---|
Configuration | | Name of the configuration to use. | | |
Attributes | | Map of attributes to set. | | |
Queue Url | | | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
#### Output
Type | String |
Attributes Type | |
#### Associated Configurations
- [Configuration](#config)
#### Throws
- SQS:ACCESS\_DENIED
- SQS:CONNECTIVITY
- SQS:INTERNAL\_FAILURE
- SQS:INVALID\_CREDENTIALS
- SQS:INVALID\_DATA
- SQS:OPT\_IN\_REQUIRED
- SQS:REQUEST\_EXPIRED
- SQS:RETRY\_EXHAUSTED
- SQS:SERVICE\_UNAVAILABLE
- SQS:THROTTLING\_EXCEPTION
## Object Types
- [Batch Result](#BatchResult)
- [Batch Result Error Entry](#BatchResultErrorEntry)
- [Change Message Visibility Batch Request Entry](#ChangeMessageVisibilityBatchRequestEntry)
- [CRL File](#CrlFile)
- [Custom OCSP Responder](#CustomOcspResponder)
- [Delete Message Batch Request Entry](#DeleteMessageBatchRequestEntry)
- [Expiration Policy](#ExpirationPolicy)
- [Keystore](#KeyStore)
- [Large Payload Support](#LargePayloadSupport)
- [Message](#Message)
- [Reconnect](#Reconnect)
- [Reconnect Forever](#ReconnectForever)
- [Reconnection](#Reconnection)
- [Redelivery Policy](#RedeliveryPolicy)
- [Request ID Attribute](#RequestIDAttribute)
- [Send Message Result](#SendMessageResult)
- [Standard Revocation Check](#StandardRevocationCheck)
- [TLS](#Tls)
- [Truststore](#TrustStore)
### Batch Result
For each message in the batch, the response contains a String representing the entry ID if the
message succeeds or a BatchResultErrorEntry tag if the message fails.
| Field | Type | Description | Default Value | Required |
|---|
Failed | | | | |
Successful | | List of String items representing the entry ID. | | |
### Batch Result Error Entry
Used in the responses of a batch API to give a detailed description of the result of an action on
each entry in the request.
| Field | Type | Description | Default Value | Required |
|---|
Code | | Error code that represents why the action failed on this entry. | | |
Id | | ID of an entry in a batch request. | | |
Message | | Message that explains why the action failed on this entry. | | |
Sender Fault | | Whether the error happened due to the sender’s fault. | | |
### Change Message Visibility Batch Request Entry
Used to change the visibility timeout of messages.
| Field | Type | Description | Default Value | Required |
|---|
Id | | Identifier for this particular receipt handle. This is used to communicate the result. The IDs of a batch request must be unique within the request. | | |
Receipt Handle | | Receipt handle for this entry. | | |
Visibility Timeout | | New value (in seconds) for the message’s visibility timeout. | | |
### CRL File
Specifies the location of the certification revocation list (CRL) file.
| Field | Type | Description | Default Value | Required |
|---|
Path | | | | |
### Custom OCSP Responder
Configures a custom OCSP responder for certification revocation checks.
| Field | Type | Description | Default Value | Required |
|---|
Url | | URL of the OCSP responder. | | |
Cert Alias | | Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore. | | |
### Delete Message Batch Request Entry
Used to delete messages in batch.
| Field | Type | Description | Default Value | Required |
|---|
Id | | Identifier for this particular receipt handle. This is used to communicate the result. The IDs of a batch request must be unique within the request. | | |
Receipt Handle | | Receipt handle for this entry. | | |
### Expiration Policy
Configures an expiration policy strategy.
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
Time Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Max Idle Time field. | | |
### Keystore
Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a
public certificate.
| Field | Type | Description | Default Value | Required |
|---|
Path | | Path to the keystore. Mule resolves the path relative to the current classpath and file system. | | |
Type | | | | |
Alias | | Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file. | | |
Key Password | | Password used to protect the private key. | | |
Password | | Password used to protect the keystore. | | |
Algorithm | | Encryption algorithm that the keystore uses. | | |
### Large Payload Support
Supports large message payloads on Amazon SQS.
| Field | Type | Description | Default Value | Required |
|---|
Bucket | | Name of the AWS S3 bucket in which to store large payload messages. The AWS S3 bucket must already be created and configured in AWS S3. Enabling this feature incurs additional charges for using AWS S3. | | |
Message Size Threshold | | Message size threshold value for storing message payloads in the AWS S3 bucket. The default value for the message size threshold is 256 KB and the maximum threshold size value is 256 KB. The maximum message size is 2 GB. | | |
Message Size Threshold Unit | | Data unit for the Message Size Threshold field. | | |
Custom S3 Endpoint | | Sets a custom S3 endpoint. Useful when a non-standard service endpoint is required, such as a VPC endpoint. | | |
S3 Key Prefix | | Prefix to prepend to Amazon S3 object keys when storing large message payloads in the S3 bucket. | | |
### Message
Output attributes for a sent message.
| Field | Type | Description | Default Value | Required |
|---|
body | | | | |
deduplicationId | | Token for deduplicating sent messages. If multiple messages are sent with the same deduplication ID, Amazon SQS accepts the messages successfully, but delivers only the first message during the deduplication interval (5 minutes by default). For FIFO queues, set ContentBasedDeduplication to true at a queue level to automatically generate the value for the deduplicationId field. | | |
delaySeconds | | Number of seconds that a specific message is delayed. Valid values are 0 through 900. If no value is specified, the default value for the queue is used. The delaySeconds field cannot be set per message when FifoQueue is set; delaySeconds can only be set at a queue level. | | |
groupId | | Group this message belongs to in the FIFO queue. This parameter applies only to FIFO queues. When creating a FIFO queue, this parameter is required. | | |
id | | Unique identifier for the message. | | |
message Attributes | | Map of typed key-value pairs to send as message attributes. You must specify a value, key, and data type for each entry. | | |
receipt Handle | | Receipt handle for this entry. | | |
### Reconnect
Configures a standard reconnection strategy, which specifies how often to reconnect and how many
reconnection attempts the connector source or operation can make.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
Count | | How many reconnection attempts the Mule app can make. | | |
### Reconnect Forever
Configures a forever reconnection strategy by which the connector source or operation attempts to
reconnect at a specified frequency for as long as the Mule app runs.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Reconnection
Configures a reconnection strategy for an operation.
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
Reconnection Strategy | | Reconnection strategy to use. | | |
### Redelivery Policy
Configures the redelivery policy for executing requests that generate errors. You can add a
redelivery policy to any source in a flow.
| Field | Type | Description | Default Value | Required |
|---|
Max Redelivery Count | | Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error. | | |
Use Secure Hash | | Whether to use a secure hash algorithm to identify a redelivered message. | | |
Message Digest Algorithm | | Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned. | | |
Id Expression | | One or more expressions that determine when a message was redelivered. This property can be set only if the Use Secure Hash field is false. | | |
Object Store | | Configures the object store that stores the redelivery counter for each message. | | |
### Request ID Attribute
Used for a request ID.
| Field | Type | Description | Default Value | Required |
|---|
Request Id | | AWS request ID used when a service call isn’t working as expected, and you need to work with AWS support to debug an issue. | | |
### Send Message Result
Sends the result of the message.
| Field | Type | Description | Default Value | Required |
|---|
MD5 Of Message Attributes | | MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly. The first URL in Amazon SQS decodes the message before creating the MD5 digest. For information about MD5, refer to RFC 1321 - The MD5 Message-Digest Algorithm. | | |
MD5 Of Message Body | | MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly. The first URL in Amazon SQS decodes the message before creating the MD5 digest. For information about MD5, refer to RFC 1321 - The MD5 Message-Digest Algorithm. | | |
Message Id | | | | |
### Standard Revocation Check
Configures standard revocation checks for TLS certificates.
| Field | Type | Description | Default Value | Required |
|---|
Only End Entities | | Which elements to verify in the certificate chain: true
Verify only the last element in the certificate chain. false
Verify all elements in the certificate chain.
| | |
Prefer Crls | | How to check certificate validity: true
Check the Certification Revocation List (CRL) for certificate validity. false
Use the Online Certificate Status Protocol (OCSP) to check certificate validity.
| | |
No Fallback | | Whether to use the secondary method to check certificate validity: true
Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity. false
Do not use the secondary method to check certificate validity.
| | |
Soft Fail | | What to do if the revocation server can’t be reached or is busy: true
Avoid verification failure. false
Allow the verification to fail.
| | |
### TLS
Configures TLS to provide secure communications for the Mule app.
| Field | Type | Description | Default Value | Required |
|---|
Enabled Protocols | | Comma-separated list of protocols enabled for this context. | | |
Enabled Cipher Suites | | Comma-separated list of cipher suites enabled for this context. | | |
Trust Store | | Configures the TLS truststore. | | |
Key Store | | Configures the TLS keystore. | | |
Revocation Check | | Configures a revocation checking mechanism. | | |
### Truststore
Configures the truststore for TLS.
| Field | Type | Description | Default Value | Required |
|---|
Path | | Path to the truststore. Mule resolves the path relative to the current classpath and file system. | | |
Password | | Password used to protect the truststore. | | |
Type | | | | |
Algorithm | | Encryption algorithm that the truststore uses. | | |
Insecure | | If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks. | | |
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Amazon SQS Connector 5.12 Studio Configuration
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and
configuration files.
To add and configure a connector in Studio:
1. [Create a Mule project](#create-mule-project).
2. [Add the connector to your Mule project](#add-connector-to-project).
3. [Configure a source for the connector’s flow](#configure-input-source).
4. [Configure a global element for the connector](#configure-global-element).
When you run the connector, you can view the app log to check for problems, as described in
[View the App Log](#view-app-log).
If you are new to configuring connectors in Studio, see
[Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio).
If, after reading this topic, you need additional information about the connector fields, see the
[Amazon SQS Connector Reference](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-reference#node-behavior).
## Create a Mule Project
In Studio, create a new Mule project in which to add and configure the connector:
1. In Studio, select **File > New > Mule Project**.
2. Enter a name for your Mule project and click **Finish**.
## Add the Connector to Your Mule Project
Add Amazon SQS Connector to your Mule project to automatically populate the XML code with the
connector’s namespace and schema location and add the required dependencies to the project’s
`pom.xml` file:
1. In the **Mule Palette** view, click **(X) Search in Exchange**.
2. In **Add Modules to Project**, type `amazon sqs` in the search field.
3. Click **Amazon SQS** in **Available modules**.
4. Click **Add**.
5. Click **Finish**.
Adding a connector to a Mule project in Studio does not make that connector available to other
projects in your Studio workspace.
## Configure a Source
A source initiates a flow when a specified condition is met. You can configure one of these input
sources to use with Amazon SQS Connector:
- **Receive messages**
Retrieves one or more messages from the specified queue
- **HTTP > Listener**
Initiates a flow each time it receives a request on the configured host and port
- **Scheduler**
Initiates a flow when a time-based condition is met
For example, to configure the **Receive messages** source operation, follow these steps:
1. In the **Mule Palette** view, select **Amazon SQS > Receive messages**.
2. Drag **Receive messages** to the Studio canvas.
3. On the **Receive messages** configuration screen, optionally change the value of the **Display
Name** field.
4. Specify values for the following fields:
- **Visibility Timeout**
Period of time during which other consumers are prevented from receiving and processing the
same message in the queue
- **Visibility Timeout unit**
The time unit for the Visibility Timeout:
- NANOSECONDS
- MICROSECONDS
- MILLISECONDS
- SECONDS
- MINUTES
- HOURS
- DAYS
- **Preserve Messages**
Preserve messages after they are read rather than immediately deleting them from the queue
after they are read
- **Number Of Messages**
Number of messages to retrieve
- **Queue Url**
URL of the queue in which to receive messages
5. If you are using the **Receive messages** source in cluster mode and want to receive messages on
the primary node only, select the **Primary node only** checkbox on the **Receive messages >
Advanced** tab:

For more information, see
[Receiving Messages in Cluster Mode](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-config-topics#node-behavior).
## Configure a Global Element for the Connector
When you configure a connector, it’s best to configure a global element that all instances of that
connector in the app can use. Configuring a global element requires you to provide the
authentication credentials the connector uses to access the target Amazon SQS system. Amazon SQS
supports the Basic and Role authentication methods for connections.
You can either enter your credentials into the global configuration properties or reference a
configuration placed in a file in the `src` folder of your project file that contains these values.
For simpler maintenance and better reuse of your project, use a configuration file.
1. Drag a connector operation onto the Studio canvas.
2. To create a global element for the connector, click the **Global Elements** tab at the base of
the canvas, and then click **Create**.
3. In the **Choose Global Type** window, expand **Connector Configuration** and select **Amazon SQS
Configuration**:

4. Click **OK**.
5. Specify the global element properties:

| Field | Description |
|---|
Name | Name used to reference the configuration |
Session Token | Session token used to validate the temporary security credentials |
Access Key | Alphanumeric text string that uniquely identifies the user who owns the account |
Secret Key | Key that acts as a password |
Try AWS Credentials Provider Chain | Drop-down menu that controls whether to use temporary credentials |
Region Endpoint | Regional endpoint to process your requests |
SQS Endpoint | SQS endpoint for Amazon VPC support. |
Default Global URL | URL of the Amazon SQS queue to act upon |
When you provide a queue URL in the **Default Global Queue URL** field of the global element,
the connector automatically creates the queue and sets the URL of this queue as the provided
value. All Amazon SQS message processors that reference the global element perform operations
using this queue URL.
To reference a different queue URL for a particular message processor in the flow, perform the
operation using the `Queue URL` attribute provided by the message processor.
6. Leave the default entries for the **Proxy** tab.
7. Click **Test Connection** to confirm that the parameters of your global configuration are
accurate and that Mule is able to connect successfully to your instance of Amazon SQS.
To test the connection, you must specify a value for the **Test Queue Arn** field in the
configuration. If a value is not specified, the test connection is not performed, and the
console displays a warning when the operation is invoked.
8. Click **OK**.
## View the App Log
To check for problems, you can view the app log as follows:
- If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio
console window.
- If you’re running the app using Mule from the command line, the app log is visible in your OS
console.
Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the
app log in the default location `MULE_HOME/logs/.log`.
## Next Step
After configuring this connector in Studio, see
[Additional Configuration Information](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-config-topics) for more configuration
steps.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Amazon SQS Connector 5.12 XML and Maven Support
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
If you manually code a Mule app in XML either from the Anypoint Studio XML editor or from a text
editor, you can access Anypoint Connector for Amazon SQS (Amazon SQS Connector) in your app by
adding reference statements to your XML Mule flow and in the Apache Maven `pom.xml` file.
> [!NOTE] You can avoid the manual process described next by using Studio. When you install Amazon
> SQS Connector in Studio, Studio automatically populates the XML code with the Amazon SQS Connector
> namespace and schema location, and adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `` tag of the header of your configuration XML:
```xml
http://www.mulesoft.org/schema/mule/amazon-sqs
http://www.mulesoft.org/schema/mule/amazon-sqs/current/mule-amazon-sqs.xsd
```
This example shows how the namespace statements are placed in the XML:
```xml
```
## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app.
If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to
this connector:
```xml
com.mulesoft.connectors
mule-amazon-sqs-connector
x.x.x
mule-plugin
```
Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/).
2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
3. In Exchange, search for `amazon sqs`.
4. Select the connector.
5. Click **Dependency Snippets** near the upper right of the screen.
## Next Step
After completing your namespace and `pom.xml` file, you can try the
[example](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-examples).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Troubleshooting Amazon SQS Connector 5.12
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
To troubleshoot Anypoint Connector for Amazon SQS (Amazon SQS Connector), become familiar with the
information about interpreting commonly thrown exception messages.
## Enable SSL Logging
Enable SSL logs to investigate an issue related to TLS communications.
Set your SSL log level depending on your required level of detail:
1. Enable only SSL log details:
`javax.net.debug=ssl`
2. Enable only handshaking details. (The handshake protocol is a series of messages exchanged over
the record protocol.)
`javax.net.debug=ssl:handshake`
3. Enable handshaking details and SSL details at the same time:
`javax.net.debug=ssl, handshake`
4. Enable the dumping of all details and traffic data:
`javax.net.debug=all`
> [!NOTE] This option is very verbose and under normal circumstances is not necessary.
> [!WARNING] SSL logging results in a performance impact for HTTPS or other TLS connections. Enable
> SSL logging only to troubleshoot a specific issue and do not enable it for extended periods. SSL
> logging produces a significant amount of log messages and can inundate your log file if it is left
> enabled and unattended.
To enable SSL logs:
Set the debug parameter as an argument in the runtime configuration for the application.
1. In Studio, right-click on the project and select **Run > Run Configurations**.
2. Go to the **Arguments** tab and add `-M-Djavax.net.debug=ssl` in the **VM arguments** section.
## Enable Verbose Exception Logging
Enable verbose exception logs to show a complete stack trace of the error instead of the default
truncated output:
1. In Studio, right-click on the project and select **Run > Run Configurations**.
2. Go to the **Arguments** tab and append the arguments in the **VM arguments** section to add the
`mule.verbose.exceptions` property. For example:
`-XX:PermSize=128M -XX:MaxPermSize=256M -Dmule.verbose.exceptions=true`
## Enable Verbose Logging
To get a better understanding of why an application’s interaction with Amazon SQS Connector is
failing, temporarily enable verbose logging for the connector.
Remember to always disable enhanced verbosity after troubleshooting, because it can affect your Mule
application’s performance.
To enable verbose logging in the configuration file:
1. Access Anypoint Studio and navigate to the **Package Explorer** view.
2. Open your application’s project name.
3. Open the `src/main/resources` folder.
4. Open the `log4j2.xml` file inside the folder.
5. Add an `` tag inside the `` tag:
```xml
...
...
```
6. Save your application changes.
7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule
Application**.
## Troubleshoot AWS STS Regionalized Endpoints
In AWS SDK v2, the endpoint that the STS client of the `AssumeRoleConnectionProvider` uses to get
session tokens is now regionalized instead of global. See the
[AWS STS Regionalized endpoints](https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html)
documentation for details. As explained in the
[AWS Security Token Service endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/sts.html)
documentation, regionalized endpoints shouldn’t cause changes in the connector’s functionality. AWS
recommends using Regional STS endpoints to reduce latency, build in redundancy, and increase session
token validation.
If you encounter any issues as a result of the change in endpoints to regionalized, you can force
Amazon SQS Connector to use the global endpoint by specifying the URL endpoint
`https://sts.amazonaws.com` in the **Custom STS Endpoint** field located in the **Advanced** tab of
the **Global Elements** properties configuration window of the connector.
## Understand Commonly Thrown Exceptions
Here is a list of commonly thrown exception messages and how to interpret them:
- SQS:ACCESS\_DENIED
The user does not have permission to execute this operation.
- SQS:CONNECTIVITY
The connection to the Amazon SQS server is interrupted.
- SQS:INTERNAL\_FAILURE
The request fails due to an unknown error, exception, or failure.
- SQS:INVALID\_CREDENTIALS
Authentication against the Amazon SQS server fails due to invalid credentials.
- SQS:INVALID\_DATA
The test connection cannot be performed because the Test Queue ARN parameter is not set.
- SQS:MESSAGE\_NOT\_IN\_FLIGHT
The specified message is not in flight.
- SQS:MESSAGE\_SIZE\_THRESHOLD\_OUT\_OF\_RANGE
The message threshold size is not between 0 and 256 KB.
- SQS:OPT\_IN\_REQUIRED
The AWS access key ID requires a subscription for the service.
- SQS:OVER\_LIMIT
The attempted action exceeds a limit, for example, if the Recieve Messages source receives the
maximum number of inflight messages or if the Add Permission operation reaches the maximum number
of permissions for the queue.
- SQS:PARAMETER\_OUT\_RANGE
The value is not within the specified range.
- SQS:PURGE\_QUEUE\_IN\_PROGRESS
The specified queue receives a Purge Queue request within the last 60 seconds.
- SQS:QUEUE\_ALREADY\_EXISTS
There is a queue with this name already and the request includes different attributes from the
existing queue with this name.
- SQS:QUEUE\_DELETED\_RECENTLY
A queue with the same name is deleted within the last 60 seconds.
- SQS:REQUEST\_EXPIRED
The request reaches the service more than 15 minutes after the request date stamp or the request
expiration date, or the request date stamp is more than 15 minutes in the future.
- SQS:RETRY\_EXHAUSTED
The retries of a certain execution block are exhausted.
- SQS:S3\_BUCKET\_ACCESS\_DENIED
The server returns an AmazonSQSException with a 403 HTTP status code.
- SQS:S3\_BUCKET\_NOT\_FOUND
The server returns an AmazonSQSException with a 404 HTTP status code.
- SQS:SERVICE\_UNAVAILABLE
The server is experiencing a temporary failure.
- SQS:THROTTLING\_EXCEPTION
The request fails due to request throttling.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Amazon SQS Connector Reference](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-reference)
- [Salesforce Help](https://help.salesforce.com)
- [Known Issues](https://help.salesforce.com/s/issues)
---
product: Amazon SQS Connector
version: 5.12
is-latest-version: true
---
# Upgrading and Migrating Amazon SQS Connector to 5.12
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Upgrade Anypoint Connector for Amazon SQS to 5.12 to improve and optimize the performance of your
projects using long polling, multithreading, and more control over the polling parameters.
## Supported Upgrade Paths
### 5.12
- Amazon SQS Connector now supports passing an external ID in Role-based authentication.
- In the **Receive messages** source, the **Time unit** field is renamed to **Start delay time
unit**, and its default value is changed from `MILLISECONDS` to `SECONDS`.
> [!NOTE] This was changed back in v5.12.2. The field in the **Receive messages** source is now
> called **Time unit** again, and its default value is set back to `MILLISECONDS`.
### 5.11
All of the Amazon SQS Connector error types are now exported. You can see specific error messages
instead of MULE:UNKNOWN.
### 5.10
Amazon SQS Connector now supports the addition of an SQS endpoint, which you can use with Amazon
Virtual Private Cloud (VPC).
### 5.9
With release 5.9 you now have the ability to enable long polling for the Read Message source and
Read operation and to control the time interval for the polling. Long polling can reduce the number
of network requests without affecting throughput.
Additionally, you can now configure the number of threads for your sources, allowing for a higher
throughput in some situations.
### 5.8
Amazon SQS Connector now supports sending and receiving large messages with payloads of up to 2 GB.
This is beneficial when your application requires large amounts of data to be stored in queues.
> [!NOTE] This feature requires the use of the Amazon S3 service. Large payload transmissions are
> billed as one SQS request and one S3 request. Billing for the payload is based on the amount of
> data stored in Amazon S3.
### 5.7
The Messages object now contains a new `deduplicationId` field. If multiple messages are sent with
the same deduplication ID, Amazon SQS accepts the messages successfully, but delivers only the first
message during the 5-minute deduplication interval.
### 5.6
Cluster node support was added back to the `Receive Messages` input source and works the same as it
did in version 5.4.3. The input source listens for messages on all cluster nodes by default, but you
can change this behavior by using the `Primary node only` field on the `Advanced` sub-tab on the
`Receive Messages` tab. For more information, see
[Receiving Messages in Cluster Mode](https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-config-topics#node-behavior).
### 5.5
Version 5.5.0 was deprecated because cluster mode support was removed from that version.
### 5.4.2
The Amazon SDK for Java dependency was upgraded to version 1.11.649.
## Requirements
Ensure your system meets the following requirements before you perform the upgrade:
| Application/Service | Version |
|---|
Mule | 4.1.1 and later |
Java | 11 |
Anypoint Studio | 7.0 and later |
See the
[Amazon SQS Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-sqs-connector-release-notes-mule-4)
for updated compatibility information for patch updates.
## Upgrade Prerequisites
Before you upgrade, create a backup of your files, data, and configurations in case you need to
restore them.
## Upgrade Steps
Follow these steps to perform the upgrade:
1. In Anypoint Studio, create a Mule project.
2. In the **Mule Palette** view, click **Search in Exchange**.
3. Enter `sqs` in the search field.
4. In the **Available modules** section, select **Amazon SQS Connector** and click **Add**.
5. Click **Finish**.
6. Verify that the `mule-amazon-sqs-connector` dependency version is `5.9.x` in the `pom.xml` file
in the Mule project. Replace `x` with the version that corresponds to the connector you are
using.
7. In version 5.5.0, the `Receive Messages` input source received messages on the primary node
only. To obtain the same behavior in this version, access the **Advanced** tab in the **Receive
Messages** source operation configuration and select the **Primary node only** field.
If you’re upgrading from version 5.4.x or earlier to version 5.8 or later, this step is not
needed.
Studio upgrades the connector automatically.
## Post Upgrade Steps
After you install the latest version of the connector, verify the upgrade:
1. In Studio, verify that there are no errors in the **Problems** or **Console** views.
2. Verify that there are no problems in the project `pom.xml` file.
3. Test the connection and verify that the operations work.
## Troubleshooting
If there are problems with caching the parameters and metadata, try restarting Studio.
## Revert the Upgrade
If you must revert to your previous version of Amazon SQS Connector, change the
`mule-amazon-sqs-connector` dependency version `5.9.x` in the project’s `pom.xml` to the latest
version which is not deprecated, `5.8`.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)