SQSConnector
Accesses the Amazon Simple Queue service to send or receive messages.
Typical Uses
- Aggregation of data from queues and other message streams
- Trigger an action from a message
How does it work?
The SQSConnector uses your Amazon AWS account credentials (either via a previously defined FME web connection, or by setting up a new FME web connection right from the transformer) to access the queue storage service.
Configuration
Input Ports
This transformer accepts any feature.
Output Ports
The output of this transformer will vary depending on the action performed. Message data and metadata are presented as feature attributes.
The incoming feature is output through this port.
Features that cause the operation to fail are output through this port. An fme_rejection_code attribute, having the value ERROR_DURING_PROCESSING, will be added, along with a more descriptive fme_rejection_message attribute which contains more specific details as to the reason for the failure.
Note: If a feature comes in to the SQSConnector already having a value for fme_rejection_code, this value will be removed.
Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter.
Parameters
Credential Source |
Credentials can be used from different sources. Using a web connection integrates best with FME, but in some cases, you may wish to use one of the other sources.
|
Account |
Available when the credential source is Web Connection. To create an Amazon Web Services connection, click the 'Account' drop-down box and select 'Add Web Connection...'. The connection can then be managed via Tools -> FME Options... -> Web Connections. |
Region | The AWS Region in which the specified Queue resides. Overrides the region set in the web connection if specified. |
Embedded Credentials | Available when the credential source is Embedded. An access id and secret key can be specified directly in the transformer instead of in a web connection. |
Queue |
Specify the queue name to send to or receive from. A queue can be entered manually, or selected interactively by clicking the ellipses. |
Action |
The type of operation to perform. Choices are:
|
The remaining parameters available depend on the value of the Request > Action parameter. Parameters for each Action are detailed below.
No options. Returns the count of messages in a queue.
Output Attributes
sqs_count | The estimated total amount of messages. |
sqs_count_visible |
The estimated total amount of visible messages. |
Deletes messages from the queue.
Delete Options
Message Receipt Handle |
Required for deleting a message. Retrieved from a previous receive operation. |
Receives messages from the front of the queue.
Receive Options
Mode |
The following message receiving options are available:
|
Maximum Messages to Read |
For the After a Fixed Number of Messages option, specifies the number of messages to read. |
Delete on Receive |
If Yes, then delete the messages as soon as they are received from the queue. If No, the messages can be received again after the visibility timeout. |
Receive Request Attempt Id |
Only for FIFO Queues. Used to resend a receive request the same way as a previous attempt id, ignoring the visibility timeout. |
Visibility Timeout (seconds) |
The time the message is invisible. After the timeout expires, the message is visible. The default is 30 seconds. |
Send Options
Content |
An encoded message. The default encoding is an xml unicode string. |
Message Delay (seconds) |
The time before a message is visible on the queue. |
Is Queue FIFO |
Whether the Queue is FIFO. |
Message Group Id |
The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are always processed one by one, in a strict order relative to the message group (however, messages that belong to different message groups might be processed out of order). |
Message Deduplication Id |
The token used for deduplication of sent messages. If the queue has ContentBasedDeduplication enabled, this parameter is optional. If a message with a message deduplication ID is sent successfully, any messages sent with the same message deduplication ID are accepted successfully but aren't delivered during the 5-minute deduplication interval. |
Message Attributes
- Attribute Name: The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.)
- Type: Select between StringType, NumberType, or BinaryType
- Value:
- String: Any string value.
- Number: Any number value.
- Binary: Either a binary value or a path to a binary file.
The following attributes can be selected for inclusion on the output features. Each output feature represents a message that was either sent or received.
sqs_message_id |
The id of a message. Required for updating and deleting. |
sqs_content |
The message content. |
sqs_md5 |
The md5 of a message, including the message attributes. |
sqs_receipt_handle |
The pop receipt of a message, obtained from a receive operation. Required for updating and deleting. |
_attributes{}.key |
A list of all the message attribute names. |
_attributes{}.value |
A list of all the message attribute values. |
_message_deduplication_id |
Only for a FIFO queue message. See above description. |
_message_group_id |
Only for a FIFO queue message. See above description. |
_queue |
The queue URL of the message. |
_sequence_number |
Only for a FIFO queue message. The large, non-consecutive number that Amazon SQS assigns to each message. |
_timestamp |
The message creation unix time in milliseconds. |
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Dialog Options - Tables
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | Amazon Web Services account |
Aliases | |
History | Released FME 2020.0 |
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for all results about the SQSConnector on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.