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

[WIP] Add option for making consumer exclusive #388

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

Conversation

anderslemke
Copy link
Contributor

@anderslemke anderslemke commented Mar 19, 2019

  • Documentation

In some situations, the execution order of messages is crucial.
In such situations, RabbitMQ can ensure that there are no more than one consumers on a queue, with the exclusive option.

@anderslemke anderslemke changed the title Add options for making consumer exclusive Add option for making consumer exclusive Mar 19, 2019
@anderslemke anderslemke changed the title Add option for making consumer exclusive [WIP] Add option for making consumer exclusive Mar 19, 2019
@michaelklishin
Copy link
Collaborator

This does not make the consumer exclusive, it makes the queue exclusive. Is that what you are really after?

@anderslemke
Copy link
Contributor Author

@michaelklishin I might confuse some concepts here.

There is an exclusive flag in this gem already:

:exclusive => false,

As far as I understand, this controls the queue: https://www.rabbitmq.com/queues.html#exclusive-queues . This is what I would call "exclusive queue".

I want this PR to control the exclusive-flag in https://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.consume . This is what I refer to when I say "exclusive consumer".

I will beef up the PR-description to talk about the motivation for this.

@anderslemke anderslemke force-pushed the provide-exclusive-option-for-consumers branch from a09520f to 6b7fdeb Compare March 25, 2019 09:36
@anderslemke anderslemke force-pushed the provide-exclusive-option-for-consumers branch 2 times, most recently from 45e9eb6 to b81b6a8 Compare March 25, 2019 10:59
@anderslemke
Copy link
Contributor Author

anderslemke commented Mar 25, 2019

@michaelklishin I've tested this PR locally, and I get the following results.

When I set the new exclusive-flag to false, I get consumers with this config:

Screenshot 2019-03-20 at 10 13 50

When I set the new exclusive-flag to true, I get a consumer with this config:

Screenshot 2019-03-20 at 10 13 32

This is actually what I want to achieve. But I'm not sure I use the terms correct, though.

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.

2 participants