0.0
No release in over a year
Reprocess failed messages using an exponential backoff algorithm
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 1.2.0
 Project Readme

Hutch retry

Hutch-retry is an extension for hutch framework. It allows consumers to reprocess failed messages using an exponential backoff algorithm.

Requirements

  • hutch 1.2.0 - this library uses monkey patch to add retry mechanism

Installation

Install the gem and add it to the application's Gemfile by executing:

$ bundle add hutch-retry

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install hutch-retry

Usage

To use hutch-retry replace Hutch::Consumer with Hutch::Retry::Consumer in your class.

class ExampleConsumer
  include Hutch::Retry::Consumer

  consume "hutch.example"
  max_retries 3
  retry_on [TimeoutError]
  retry_exchange_options name: "example.retry",
                         durable: false
end
Option name Default value Type
max_retries 5 Integer
retry_on [StandardError] Array
retry_exchange_options[:name] <queue_name>.retry String
retry_exchange_options[:durable] true Boolean

Development

After checking out the repo, run bundle install to install dependencies. Then, run rake spec to run the tests.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Motimate/hutch-retry.

License

The gem is available as open source under the terms of the MIT License.