Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration options for consumer subscribing to a queue #402

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

hedacharon
Copy link

@hedacharon hedacharon commented Jul 26, 2019

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 and others added 14 commits April 21, 2021 09:46
Addition to fix jondot#417

Update DemoMiddleware to return worker result for property handling
We already have it as runtime dependency
Previously Sneakers was able to handle StandardError and ScriptError exceptions and their descendants. But there are more exceptions that could cause problems.

* SystemStackError (stack level too deep)
* NoMemoryError
* custom descendants of Exception (e.g. declared by gems)

In case of these exceptions, the handler is unable to report job state to the RabbitMQ. RabbitMQ keeps sending new jobs to the Sneakers until prefetch value reached. It makes Sneakers worker hang without processing any new message.
@michaelklishin
Copy link
Collaborator

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 🙏

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.

10 participants