Note |
---|
This feature is in Beta. |
Statues queues allow organizations to send photo information messages to AWS Simple Queue Service to be processed by external integrations when a photo reaches a specified photo status, i.e. PENDING
, APPROVED
, DENIED
, DISCARDED
, READY_FOR_DOWNLOAD
, DOWNLOADED
, DONE
, ENROUTE
, ON_HOLD
.
Consuming messages from an SQS Queue
The specifics of interacting with SQS are outside the scope of this documentation because they are well documented by AWS AWS already maintains thorough documentation, and most major programming languages have existing libraries for interacting with AWS. However, the high-level process for consuming SQS Photo Status Messages is as follows:
Receive a message or a list of messages
Handle debouncing (if relevant). Ideally, message processing is idempotent because Status Queues provide at-least-once delivery, but messages may be received more than once in some situations. If you receive multiple messages with the same combination of
id
andstatus
, you have likely received a duplicate message.Handle order message ordering (if relevant). Status Queues generally deliver status messages in order, but this is not strictly guaranteed, and AWS FIFO SQS queues are not currently supported.
Process the message(s).
Delete the message(s) from SQS. Otherwise, the message(s) will continue to be received by your client after the visibility timeout expires.
Sample Status Queue Message
Code Block | ||
---|---|---|
| ||
{ "domainClass": "us.cloudcard.api.Photo", "publicKey": "135404.23.331.YM9K3anh92S12oR2p0o07dC50T0pHfkp5149GeofGPgvl4tWKOGbvJutY1uMSrk1HVN9o7RS2qWB1Zg2", "manuallyEdited": false, "person": { "id": 605353, "username": "tony+1dj3n@acme.com", "email": "tony+1dj3n@acme.com", "identifier": "ABC000123456", "customFields": { "Full Name": "John Smith" }, "organization": { "id": 135404, "name": "Acme Co.", "identifier": "acme" }, "additionalPhotos": [], "additionalPhotoRequired": true }, "status": "DOWNLOADED", "originalPhoto": null, "dateCreated": "2023-11-27T05:40:45+0000", "id": 1419977, "links": { "bytes": "https://s3.amazonaws.com/test-photos.onlinephotosubmission.com/100404.23.331.YM9K3anh92S12oR2p0o07dC50T0pHfkp5149GeofGPgvl4tWKOGbvJutY1uMSrk1HVN9o7RS2qWB1Zg2.jpg" }, "version": 2, "lowestClassification": 0.99846, "backgroundReplaced": true, "aspectRatio": 1, "helperBotReviewed": true, "isAspectRatioCorrect": true } |
See Also:
Page Tree | ||||||
---|---|---|---|---|---|---|
|
...