Draft
Conversation
167122d to
fa32d56
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



We currently are using a scheduled solid queue job to run a custom poller implemetation for SQS to process messages. We do this for two ActiveJobs
ReceiveSubmissionBouncesAndComplaintsJobandReceiveSubmissionDeliveriesJob.We can use the native SQS adapter for ActiveJob and remove custom poller implementation. It provides better support for configuration, multiple workers, back pressure, message visibility_timeout. It also allows to process messages closer to realtime, rather than every 10 mins.
Before we can adopt the AWS ActiveJob SQS we need to wait for support for processing events not added by ActiveJob. This has been raised in an issue and already has PR raised to add support.
We also needed to add a Puma plugin to spawn the poller processes for the SQS Adapter. This plugin implemenation could be contributed back to the aws-activejob-sqs library.
In production we should run these worker processes in a separate workload to the main rails server (something we need to fix with our Solid Queue worker processes). However the puma plugin may still be helpful if running locally.
This pull request introduces significant changes to integrate
aws-activejob-sqsfor handling SQS queues, replacing the previous custom implementation. It includes updates to dependencies, job classes, configuration files, and the addition of a custom Puma plugin to manage the SQS poller process. Below is a summary of the most important changes grouped by theme.