Contact Free trial Login

Amazon SQS Connector 5.7 Additional Configuration Information - Mule 4

Receiving Messages in Cluster Mode

The default behavior of the Receive Messages source is to receive messages on all nodes when running in cluster mode. To have the app 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 can be introduced in the queue. You can use a FIFO 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 Stanard Queues and AWS SQS FIFO Queues.

Creating the FIFO Queue

FIFO (First-In-First-Out) queues deliver messages in the order in which they are sent.

To create the FIFO queue, use the Create queue operation. When you configure this operation:

  • In the Attributes table, set the FifoQueue attribute to true.

  • Optionally, set the ContentBasedDeduplication attribute to true to have Amazon SQS generate the ID using the message body.

    The default for the ContentBasedDeduplication attribute is false. If you don’t set this field to true, users must set the deduplicationId attribute manually when sending messages to the queue, or the Create queue operation fails.

  • End the value for the Queue name field with the .fifo extension, for example, MyTestFIFOQueue.fifo.

  • Choose any region that Amazon SQS supports.

When using Amazon SQS Connector to send messages to the FIFO queue, use the same queue URL and region name that Amazon SQS returned as the result of the Create queue operation. You must also provide a value for the Message group id field in the connector configuration while sending messages.

Next

After you create the FIFO queue, you can try the Amazon SQS Connector Examples.