- Ensure all worker threads exit if a thread dies in case of an unhandled exception, to avoid "zombie" workers (running without any consumer thread)
- Add support for Ruby 3.2 and Rails 7
- Remove support for Ruby 2.6, 2.7 and Rails 5 and 6.0
- dropped dependency on
ks
gem - added rails6 and ruby3/3.1 to test matrix
- Fix
Sqewer::Connection
to properly get the list of AWS errors
- Add
Aws::SQS::Errors::AccessDenied
to the list of errors that Sqewer must release the singleton SQS client
- Release the singleton SQS client when AWS raises credentials error to be able to use a new credential next time
- Remove method
Sqewer.client=
- Change
Sqewer::Connection
to use a singleton SQS client by default
- Remove support of Ruby 2.3, 2.4 and 2.5
- Remove support of Rails 4
- Change
Sqewer::Connection
to preferentially use a singleton instance ofAws::SQS::Client
, which can be set usingSqewer.client=
. This avoids many HTTP requests to the AWS metadata endpoint when getting credentials.
- Also retry on
Aws::SQS::Errors::InternalError
exception when receiving/sending messages. This will make the receiving thread more resilient to sudden SQS failures. By the time SQS recovers the receiving thread should stay alive.
- Adds
$stdout.sync = true
to CLI to flush the logs to STDOUT
- Retrieve attributes when receiving messages from SQS
- Raise an exception in submit! if the job serializes to a message that is above the native SQS limit for message size.
- Ensure SendMessageBatch is only performed for batches totaling 256KB of message size or less.
- Insert Sqewer::Error between StandardError and our custom errors for easier rescuing
- Add support for Ruby 2.7
- Test the Appsignal integration using actual Appsignal libraries
- In the Appsignal integration, replace a call of
set_queue_start=
withset_queue_start
- Appsignal queue start time should be set as an Integer of milliseconds, not as a Time object
- Store SentTimestamp in SQLite and restore it on execution
- Pass SQS message attributes through the middleware chain
- Recover the SentTimestamp attribute and set it as queue start in Appsignal
- Make sure a job given to
submit!
responds torun
- Make sure :sqewer ActiveJob adapter parameter works in both Rails 4 and Rails 5.
- Limit ActiveJob compatibility to 4.2 and later, and add Travis test setup for multiple Ruby versions and Rails versions up to and including 5.1
- If running on an AWS EC2 instance and retrieving AWS credentials from the instance metadata, Sqewer will now retry up to five times if the instance metadata are not available. This fixes intermittent
Aws::Errors::MissingCredentialsError
exceptions.
- It is now no longer required to have ActiveJob loaded when integrating with Appsignal.
- Fix an issue in the interaction in the Activejob extension that caused all the background jobs to show up as instances of
#run
.
- Fix an issue in the interaction between the Appsignal and Activejob extensions that caused all the background jobs to show up as instances of
ActiveJob::QueueAdapters::SqewerAdapter::Performable#run
.
- Bump the supported AWS SDK to v3 and only require
aws-sdk-sqs
as a dependency. This reduces the amount of code Sqewer needs to load, as SQS is the only service we are actually using. This requires the hosting application to be updated to the SDK v3 as well. - Reduce spurious test failures when testing the ActiveJob adapter
- Add support for local SQLite-based queues, that can be used by starting the SQS_QUEUE_URL with
sqlite3:/
. This decouples sqewer from the AWS SDK and allows one to develop without needing the entire AWS stack or it's simulation environments such as fake_sqs. The SQLite database can be safely used across multiple processes.
- Testing with fake_sqs when the daemon was not running or with a misconfigured SQS_QUEUE_URL could lead to Sqewer seemingly hanging. The actual cause was a very large amount of retries were being performed. The amount of retries has been adjusted to a more reasonable number.
- An exception in the message fetching thread could lead to the receiving thread silently dying, while leaving the worker threads running without any work to do. Uncaught exceptions in the receiving thread now lead to a graceful shutdown of the worker.
- Retry sending and deleting messages when
sender_fault=false
.
- Report errors with string interpolation to avoid confusion.
- Fix failure when running one test at a time.
- Additional change to error reporting: report errors both on submitting and on deleting messages.
- Released v5.0.5 to Rubygems.org.
- Added CHANGELOG.md (you're reading it!).
- Tiny change to improve error reporting; the error message from AWS when submitting to the queue is sometimes empty so we call .inspect on it.
- Released v5.0.4 to Rubygems.org.
- Removed dependency on Jeweler.
- Fixed a bug where configuration errors could cause the
receive_messages
call to hang.
- Released v5.0.3 to Rubygems.org.
- Overhauled Appsignal integration code.
- Released v5.0.2 to Rubygems.org.
- Lowered log level of exception backtraces.
- Released v5.0.1 to Rubygems.org.
- Improve Appsignal integration; only show parameters if the job actually supports those.
- Simplify CLI tests and add tests with mock workers.