aws / aws/aws-activejob-sqs-ruby

📢 Announcement: aws-activejob-sqs 1.0.0 release and upgrade information 📢

Open
#16 11 comments 4 reactions 1 assignee Claimed by @alextwoods View on GitHub
announcement guidance
Dominant language
Ruby
Stars
37
Forks
10
Avg merge
18h 57m
Merged PRs (30d)
1

Description

### Describe the issue

We're happy to announce the 1.0 release of aws-activejob-sqs with the following new features:
* Support polling on multiple queues. (#4)
* Support running without Rails. (#5)
* Support per queue configuration. (#4)
* Support loading global and queue specific configuration from ENV. (#3)
* Improved and customizable error handling: Replace `retry_standard_errors` with `poller_error_handler`. (#6)

See the updated [README](https://github.com/aws/aws-activejob-sqs-ruby/blob/main/README.md) and [API documentation](https://docs.aws.amazon.com/sdk-for-ruby/aws-activejob-sqs/api/) for information on using the new features!

## Breaking changes and migration guide
The 1.0 release contains a few breaking changes that may require code or configuration changes. If you are not ready to update, you can pin your version with `gem 'aws-activejob-sqs', '~> 0'. If you run into issues while upgrading, please feel free to open an issue or respond to this one.

#### Namespace change: Aws::Rails::SqsActiveJob → Aws::ActiveJob::SQS
The namespace has been changed to reflect the gem name and follow Ruby standards. For most users this should just require changing in code configuration from `Aws::Rails::SqsActiveJob.configure` to `Aws::ActiveJob::SQS.configure`.

#### Poller Executable name change aws_sqs_active_job → aws_active_job_sqs
To better reflect the gem name and the new namespace, we've updated the poller executable's name to `aws_active_job_sqs`. Wherever you were starting your poller(s), you'll need to update to use the new name. Version [0.1.2](https://rubygems.org/gems/aws-activejob-sqs/versions/0.1.2) has both the old and new executable names to make migration easier.

#### Default config file name: aws_sqs_active_job.yml → aws_active_job_sqs.yml
To better reflect the gem name and new namespace, we've updated the default config file name
when using rails to `config/aws_active_job_sqs.yml` or `config/aws_active_job_sqs/.yml`. You can either rename existing `aws_sqs_active_job.yml` files or use the `AWS_ACTIVE_JOB_SQS_CONFIG_FILE` environment variable to specify a different location.

#### Queue url is now a subkey
With the introduction of queue specific configuration in 1.0, queue `url` must now be configured as a sub key on the queue:

```yaml
# config/aws_active_job_sqs.yml
queues:
default:
url: 'https://my-queue-url.amazon.aws'
```

Or in code:
```ruby
Aws::ActiveJob::SQS.configure do |config|
config.queues[:default][:url] = 'https://my-queue-url.amazon.aws'
end
```

#### Changes in poller error handling: retry_standard_errors replaced with poller_error_handler
With the 1.0 release, error handling in the poller has been updated to be more flexible and to allow user configured error handlers. The `retry_standard_errors` configuration (and cli option) have been replaced by the `poller_error_handler` which allows user a user defined error handler to be called for any StandardErrors produced by job execution. The default behavior has changed from retrying StandardErrors raised during job execution to leaving the message on the queue and initiating shutdown of the poller. To change this behavior, configure a `poller_error_handler`. For more information about error handling, see: [READEME#Retry Behavior and Handling Errors](https://github.com/aws/aws-activejob-sqs-ruby/blob/main/README.md#retry-behavior-and-handling-errors)

#### Other module/class renames
* The Lambda handler has been moved to its own module and the entry point is now `Aws::ActiveJob::SQS::LambdaHandler.job_handler`.
* The `deduplicate_without` method used to configure deduplication keys on jobs has moved to its own module. You will now need to `include Aws::ActiveJob::SQS::Deduplication` in jobs that use `dedupliate_without`.

### Links

https://github.com/aws/aws-activejob-sqs-ruby/blob/main/README.md

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.