Skip to content

Use the AWS ActiveJob SQS adapter#1384

Draft
theseanything wants to merge 3 commits intomainfrom
theseanything/use-sqs-adapter
Draft

Use the AWS ActiveJob SQS adapter#1384
theseanything wants to merge 3 commits intomainfrom
theseanything/use-sqs-adapter

Conversation

@theseanything
Copy link
Contributor

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 ReceiveSubmissionBouncesAndComplaintsJob and ReceiveSubmissionDeliveriesJob.

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-sqs for 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.

@theseanything theseanything force-pushed the theseanything/use-sqs-adapter branch from 167122d to fa32d56 Compare May 9, 2025 12:06
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant