- 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
- Create New Queue
- Attribute Names
- Threadpool Configuration
- Component Configurations
- Functional Demonstration
SQSSender microservice is used to send messages to 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 to which messages are to be sent.
Create New Queue
Enable to create a new queue with the provided name.
Figure 3: Properties to create a new queue
Default Visibility Timeout (Seconds)
Amazon SQS blocks the messages after getting it queue for a timeInterval of visibility timeout, which is a period of time during which Amazon SQS prevents other consuming components from receiving and processing that message.
Value must be between 0 seconds and 12 seconds.
Message Retention Period (Seconds)
The number of seconds Amazon SQS retains a message in the Queue; an integer representing seconds, from 60 (1 minute) to 1209600 (14 days), the default value being 345600 (4 days).
Maximum Message size
The limit of how many bytes a message can contain before Amazon SQS rejects it; an integer from 1024 bytes (1KiB) upto 262144 (256 KiB), the default value being 262144 (256 KiB).
Delivery Delay (Seconds)
The time in seconds that the delivery of all messages to the queue will be delayed; an integer from 0 to 900 (15 minutes), the default value being 0.
Receive Message Wait Time (Seconds)
The time for which a Receive Message call will wait for message to arrive; an integer from 0 to 20 (seconds), the default value being 0.
Attributes to add to input scheme for easy mapping.
Figure 4: Properties to create a new queue
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 5: 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 SQSSender, which inputs the Data with provided partition key to the queue.
Figure 6: SQSSender sample flow
The Input message consists of following elements
Data to be sent to the Queue.
It is the same as Delivery Delay (Seconds), unless specifically required to be set for the message.
- Name: Name of the message to be pushed onto the queue.
- DataType: DataType should be a Number/Binary/String.
- Value: Message value according to the datatype.
Figure 7: Sample input request sent using the Feeder microservice
The output message consists of following elements
Each message receives a system-assigned message ID that Amazon SQS returns to you in the response. This identifier is useful for identifying messages.
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.
Figure 8: Output message received in the Display microservice