jondot / sneakers

A fast background processing framework for Ruby and RabbitMQ
https://github.com/jondot/sneakers
MIT License
2.24k stars 333 forks source link

Add configuration options for consumer subscribing to a queue #402

Open hedacharon opened 4 years ago

hedacharon commented 4 years ago

When a worker subscribes to a queue only two configuration options were used :block (hardcoded) and :ack (configurable using :ack option). Setting other consumer configuration options such as consumer priorities or exclusive consumers was not possible.

Creating new consumer_options configuration options block resolves that and all configured consumer options are directly passed to queue.subscribe (in more general way than pull request for exclusive consumers) while original defaults are kept as new defaults. The approach is similar to exchange_options and queue_options which are already in codebase. Old :ack configuration option becomes deprecated, but is mapped via deprecated options mapping.

michaelklishin commented 3 weeks ago

Sneakers now has a new home under https://github.com/ruby-amqp/kicks. May I ask you to re-submit this PR there? Thank you 🙏