We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there any way of declare a queue as a Quorum Queue in order to be used on a K8s cluster with multiple replicas?
Currently I don't see any way of adding additional arguments to the queue declaration (in QueueOptions). Maybe is something to be added?
The text was updated successfully, but these errors were encountered:
That's a good idea - will check what can be done, and extend the implementation.
Sorry, something went wrong.
pretty easy to do.
I extended the RabbitMqOptions.QueueOptions:
public class QueueOptions { public string Template { get; set; } public bool Declare { get; set; } public bool Durable { get; set; } public bool Exclusive { get; set; } public bool AutoDelete { get; set; } public Dictionary<string, object> Arguments { get; set; } }
Updated RabbitMqBackgroundService.Subscribe:
var queueArguments = deadLetterEnabled ? new Dictionary<string, object> { {"x-dead-letter-exchange", deadLetterExchange}, {"x-dead-letter-routing-key", deadLetterQueue}, } : new Dictionary<string, object>(); // additional arguments if (_options.Queue.Arguments != null) { foreach (var key in _options.Queue.Arguments) { queueArguments.TryAdd(key.Key, key.Value); } } channel.QueueDeclare(conventions.Queue, durable, exclusive, autoDelete, queueArguments);
Updated appsettings to pass in the quorum queue arguments:
"rabbitMq": { "queue": { "arguments": { "x-queue-type": "quorum" } } }
No branches or pull requests
Is there any way of declare a queue as a Quorum Queue in order to be used on a K8s cluster with multiple replicas?
Currently I don't see any way of adding additional arguments to the queue declaration (in QueueOptions). Maybe is something to be added?
The text was updated successfully, but these errors were encountered: