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
Allow passive exchange and queue declaration #84
Comments
This is certainly something that can be done. As a workaround for now, it's possible to try to re-declare the queue, with the exact same arguments. Resource declaration is idempotent in AMQP, as long as the properties of the resource are the same. Trying to re-declare an existing resource with different properties will result in an error. |
@acogoluegnes I have a feature branch ready, can we discuss the PR on gitter? |
You can create the PR (or draft PR) and we can discuss there. I'll be available on Gitter on Monday. Thanks! |
Fixed by #88. |
@fridgebuzz There is now an example test that uses passive declaration before publishing messages, can you please confirm this is what you want to achieve? |
@acogoluegnes Sorry for the delay, but yes this is exactly what we wanted. Thanks very much for the prompt enhancement! |
Hi team, can I active/ inactive exchange at runtime? |
@sureshparmar042 Exchanges in RabbitMQ cannot disabled, they can only be deleted and re-created. Note after deletion, all their bindings are deleted as well. |
It is desirable to be able to check whether a queue has been declared or not, and if not, declare it. This is due to the fact that queues can disappear for various reasons (think: some administrator deletes it; or, entire RabbitMQ cluster is restarted, but consuming app is still running; or the master for a non-mirrored durable queue is removed from the cluster, etc.)
Unfortunately, QueueSpecification does not support the "passive" flag.
AMQP.Queue.Declare.Builder contains method passive(), but Sender.declareQueue() does not use this method.
Incidentally, if there is some other way to achieve this "guaranteed declaration before each message published and/or consumed" we would love to hear it. There is one other possibility we know of, which is also prevented from working due to how it's implemented in reactor-rabbitmq but I'll file that problem separately.
The text was updated successfully, but these errors were encountered: