---
schema_version: "1"
id: 0adec53485c8fd8e64d082fbc6d15e94a12a1d8a637a2545a30ddc431d686e85
title: Amazon SQS Connector 5.12 Additional Configuration Information
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/amazon-sqs-connector/latest/amazon-sqs-connector-config-topics.md
canonical_url: https://docs.mulesoft.com/amazon-sqs-connector/latest/amazon-sqs-connector-config-topics
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 206c8ae76e061df9dca59b23e421298d0a84555118e1ea0295bcfdc2b35e8751
description: MuleSoft Documentation Site
release: "5.12"
latest: true
---
---
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.

![Default Wait Time Configuration](/mulesoft/current/en-us/amazon-sqs-connector/latest/_images/amazon-sqs-config-wait-time.png)

### 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:

    ![Read message configuration Advanced tab with Primary node only option selected](/mulesoft/current/en-us/amazon-sqs-connector/latest/_images/amazon-sqs-primary-node-only.png)

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**

      ![Large Payload Support configuration](/mulesoft/current/en-us/amazon-sqs-connector/latest/_images/amazon-sqs-studio-large-payload-support.png)

5.  Configure the parameters as follows:

    <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p>Bucket</p></td><td><p>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.</p></td></tr><tr><td><p>Message Size Threshold</p></td><td><p>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.</p></td></tr><tr><td><p>Message Size Threshold Unit</p></td><td><p>Represents the data unit for the message size threshold.</p></td></tr></tbody></table>

    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)
