-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support more arguments when creating a queue #78
Comments
This is relevant again as I'm experimenting with Quorum queues. I need to be able to set the headers:
I noticed these errors otherwise when trying to setup a subscriber: When
When
I'm still thinking about what kind of changes I would want to see. I'm leaning toward a more open approach, but I'm not really sure, I think I would need somebody to spitball with here. |
Now we support both classic queues (which is what we used before), and quorum queues. Only "mirrored classic queues" are deprecated, not classic queues in general, so I opted to continue supporting classic queues, even though we'll most likely not use them once we have switched all of our production queues to quorum queues. I added an extra argument to the classes that creates queues takes, which tells them what kind of queue to create. Based on that argument, the classes then either uses the `Channel#queue` or `Channel#quorum_queue` method to setup the queue. Those helpåer methods were added to Bunny in ruby-amqp/bunny@0cae5f8 Related to twingly/ansible#2316 Also a bit related to #78 (as we now support the `x-queue-type` argument). I'm not sure we need to support the `x-quorum-initial-group-size` argument mentioned there though, as we will only have three servers, which is the default value for that argument.
To be able to use the Single Active Consumer feature (to be used in https://github.com/twingly/nile/issues/94) we need to be able to set the
x-single-active-consumer
argument when declaring a queue.How we setup the queue arguments now:
twingly-amqp/lib/twingly/amqp/subscription.rb
Lines 99 to 110 in 59a2359
Either we just add that argument like we did for
x-max-length
, or make sure the user can add any arguments they like.The text was updated successfully, but these errors were encountered: