The AWS SQS Adapter provides a bridge between Neuron ESB and Amazon Web Services’ Simple Queueing Service. Using the AWS SQS Adapter, a Neuron ESB solution can either publish messages to or receive messages from an SQS queue.
Please be aware that using the AWS SQS Adapter will incur charges on your AWS SQS queue. For more information about pricing, see https://aws.amazon.com/sqs/pricing/.
The AWS SQS Adapter can operate in either Publish or Subscribe mode.
In Publish mode, The AWS SQS Adapter will poll an SQS queue periodically to determine if messages are available to be processed. If messages are returned from the SQS service, the adapter will publish those messages to a Neuron ESB topic.
In Subscribe mode, the AWS SQS adapter will subscribe to a Neuron ESB topic and will publish received messages to an AWS SQS queue.
The AWS SQS adapter defines the following properties for customizing the runtime behavior of the adapter.
- Queue URL: The URL for the SQS queue. The URL can be found from the SQS management console on the AWS website. This property is required.
- Service URL: The base URL for the SQS service in the region hosting the SQS queue. This URL can be found here: http://docs.aws.amazon.com/general/latest/gr/rande.html#sqs_region
Publish Mode Properties
The following properties are used to configure the adapter when it is used in Publish mode where messages from an SQS queue are published to a Neuron ESB topic:
- Topic: In Publish mode, the name of the topic to publish messages received from the SQS queue to.
- Polling Interval: In Publish mode, this property is the number of seconds to pause between polling attempts. The default is 30 seconds. The Polling Interval property is used to limit the number of requests that are made against the AWS SQS service as each request has a cost. You should adjust this property based on the expected message volume on the SQS queue.
- Error Reporting: specifies the severity level of errors that are reported by the adapter. Errors can be logged either as errors, warnings, or informational messages in the Neuron ESB event log.
- Error On Polling: Indicates how to proceed when errors occur. You can use this property to stop the adapter from polling the Feedback Service for additional notifications if an error occurs; to report the first error and ignore repeated errors; or to report all errors.
The Security properties are used to specify the access credentials that the SQS queue.
- Access Key: The access key for the IAM user to connect to the queue as. The access key can be found in the IAM management console on the AWS website. This property is required.
- Secret Key: The secret key for the IAM user to connect to the queue as. The secret key can be found in the IAM management console on the AWS website. This property is required.
The AWS SQS service uses strings for message bodies. In Publish mode, the AWS SQS adapter will store the contents of the received message in the ESBMessage.Text property. In Subscribe mode, the AWS SQS adapter will write the contents of the ESBMessage.Text property to the AWS SQS queue. The body of the message is application specific and is treated as an opaque blob by the AWS SQS adapter.
The maximum message size supported by AWS SQS is 256KB (262144 bytes), but this limit can be configured per queue in the AWS Management Console. Please check with your AWS administrator to determine the maximum message length for the SQS queue that you are connecting to using the adapter.
Integration with EC2 or Lambda
The AWS SQS adapter can be used to integrate with services running on AWS EC2 instances or Lambda functions. By publishing messages from Neuron ESB to an SQS queue, you can control and execute batch processing tasks external to your Neuron ESB service.
Integrating AWS Applications
The AWS SQS adapter is useful for integrating and orchestrating applications and services that are hosted in AWS. A web farm running on EC2 instances can publish events to Neuron ESB using SQS queues. Neuron ESB can operate on the messages and update other services on the backend that are not fully AWS compatible or that are external to the AWS cloud.
Access Denied When Trying to Connect to the SQS Queue or List Queues
Amazon Web Services uses the IAM service to authenticate users and authorize requests to SQS services. If you receive “access denied” or related errors when trying to use the adapter, verify that the IAM user account has the proper permissions to access the SQS queue. At a minimum, the policy should grant the user the following permissions: