- Configuration and Testing
- Component Configurations
- Pre Processing XSL Configuration
- Post Processing XSL Configuration
- Process Message Based on Property
- Validate Input
- Error handling configuration
- AWS Connection Details
- Queue Name
- Delete Messages
- Attribute Names
- Threadpool Configuration
- Component Configurations
- Functional Demonstration
SQSReceiver microservice is used to retrieve messages from Amazon Simple Queue Service (SQS).
Configuration and Testing
The following attributes can be configured in the Interaction Configuration panel as shown below.
Figure 1: Component Configuration Properties
Pre Processing XSL Configuration
Pre Processing XSL configuration can be used to transform request message before processing it. Click the small button against the property to configure the properties.
Post Processing XSL Configuration
Post Processing XSL configuration can be used to transform response message before sending it to the output port.
Process Message Based on Property
The property helps components to skip certain messages from processing.
If this attribute is enabled, the service tries to validate the input received. If disabled, service will not validate the input. For more details, refer Validate Input section section under Interaction Configurations in Common Configurations page.
Error handling configuration
The remedial actions to be taken when a particular error occurs can be configured using this attribute.
Click the ellipsis button against this property to configure Error Handling properties for different types of Errors. By default, the options Log to error logs, Stop service and Send to error port are enabled.
Refer Error Handling section in Common Configurations for detailed information.
AWS Connection Details
Click the AWS Connection Details ellipsis button to configure the properties.
Figure 2: AWS Connection properties
Specify the Access Key id
Specify the Secret Key
The region of AWS Management console.
Name of the queue from which messages are to be obtained.
Received messages are deleted from queue if enabled.
Attributes to add to input scheme for easy mapping.
Figure 3: Option to provide attribute names
This property is used when there is a need to process messages in parallel within the component, still maintaining the sequence from the external perspective.
Click the Threadpool Configuration ellipsis button to configure the Threadpool Configuration properties.
Figure 4: Threadpool Configuration properties
Enable Thread Pool
Enable this option to configure the properties that appear as below.
Number of requests to be processed in parallel within the component. Default value is '1'.
Batch Eviction Interval (in ms)
Time in milliseconds after which the threads are evicted in case of inactivity. New threads are created in place of evicted threads when new requests are received. Default value is '1000'.
The following flow demonstrates a flow of SQS Receiver receiving data from the configured Queue
Figure 5: Sample flow demonstrating SQS Receiver functionality
The Input message consists of following elements
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer .
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available,the call will return sooner than WaitTimeSecond .
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a request.
Figure 6: Sample input request sent using the Feeder microservice
The output message consists of following elements
A unique identifier for the message. Message IDs are considered unique across all AWS accounts for an extended period of time
An identifier associated with the act of receiving the message. A new receipt handle is returned every time a message is received. When deleting a message, provide the last received receipt handle to delete the message
An MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly.
An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly.
Unique ID of the Sender who passed the message to the queue.
Returns the number of times a message has been received from the queue but not deleted.
Time Stamp, when the message was received by the queue.
Returns the time the message was first received from the queue (time in milliseconds).
- Name: Name of the message obtained from the queue.
- DataType: DataType of the message received.
- Value: Value associated with the data type.
Output Message Structure:
Figure 7: Output message received in the Display microservice