Retrieve and Process AIMS Responses
What needs to be done
note: this ticket describes behavior / architecture that differs from the diagram in the parent issue. The diagram will get updated, what this ticket is describing is what we want.
From the SimpleReport backend we will create a service that will poll the AIMS "Message Queue Endpoint" (an SQS queue) for events. Data from those events will be used to get AIMS response objects from s3, parse them and save relevant response information in the database.
Why it needs to be done
We need to parse AIMS responses to confirm that messages have been sent successfully.
Acceptance Criteria
- New backend service polls SQS (assuming putting something into S3 prompts message queueing in SQS)
- Events from SQS are consumed and used to get s3 response objects
- s3 response objects are log.info'd out (e.g. "file xyz retrieved") as a placeholder until we have an actual response we can process
Technical Notes*
- AIMS suggested polling interval: 10000
- AIMS hasn't provided us with an exact spec of what these responses are going to look like. My hope is we can just send some messages (even via postman / bruno) and look at what we get in the response bucket.
- A glaring omission in the requirements for this ticket is a description of what the response database should look like (or a link to another ticket with that info). As mentioned above we haven't gotten a clear description of the response, hoping we can find out by sending messages.
Additional context
None
From discussing at 7/3 eng sync, message from Slack
From Slack: “given that we don't know the response from AIMS yet we could always make this ticket be the prototype of a service that polls the AIMS response queue and then grabs messages from AIMS response s3 bucket as needed and then just logs those messages and then followup ticket for figuring out how to store the response data (and which parts to save)”
queue processing expected to be "at least once" delivery