Retrieve Amazon SQS Messages from within a Production
InterSystems IRIS becomes a RabbitMQ consumer when an interoperability production includes a business service that uses the RabbitMQ inbound adapter. This adapter allows the business service to retrieve messages from a RabbitMQ queue. You have two options when using a production as a RabbitMQ consumer: use a built-in business service that leverages the inbound adapter or build your own business service that uses the adapter.
Built-in Business Service
Rather than building a custom business service that uses the inbound adapter, you can simply add EnsLib.AmazonSQS.ServiceOpens in a new tab to the production and define the adapter properties using the Management Portal settings. As the business service retrieves messages from Amazon SQS at the interval determined by the Basic Settings > Call Interval setting, these messages are forwarded to another business host in the production using asynchronous requests. The business host where these requests are forwarded is determined by the Basic Settings > Target Config Names setting.
For basic information about adding a business service to a production, see Adding Business Hosts.
The Amazon SQS inbound adapter is the class EnsLib.AmazonSQS.InboundAdapterOpens in a new tab. It includes the following settings, all of which appear in the Management Portal as settings for the business service that uses the adapter:
Queue defines the Amazon SQS queue from which the consumer is receiving messages.
DeleteAfterReceive determines whether the message is deleted from the queue after the production receives it.
ReceiveSettings (optional) a JSON string defining settings for message retrieval. The list of available settings is the same as the list of properties made available by the Amazon SQS API SQSReceiveSettings class, with each property name serving as the key.
For general information about building a custom business service that uses an inbound adapter, see Defining Business Services.
General AWS Settings
The Amazon SQS inbound adapter extends a common adapter class that includes general AWS properties. When you add a business service that uses the inbound adapter to a production, these AWS properties can be set using the AWS settings for the business service in the Management Portal.
CredentialsFile — If blank, Amazon uses the default credential provider chainOpens in a new tab to obtain the credentials needed to access SQS. If you prefer to use an AWS credential file, enter its pathname.
Region — Identifies the AWS region that you want to access. For a list of regions, see Amazon Regions, Availability Zones, and Local ZonesOpens in a new tab.