-
Notifications
You must be signed in to change notification settings - Fork 64
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
rabbitmq client tries to reconnect while shutting down #217
Comments
The client will attempt to restart unless it has been closed. |
So you are saying this is happening during consumer shutdown, and consumers nature is to reconnect after shutdown, and quarkus should be shutting down & starting the whole client instead? |
Kindof, yes. I wrote a fix for this yesterday, but testing it is a bit awkward. I think it's unusual to restart Vertx within a single process, which is why there aren't more people complaining about this (we do it all the time in tests, but they explicitly close the rabbitmq client). |
I also stumbled across this problem in tests. IMHO the consumer should only restart if the shutdown signal is not coming from the application. That would be the same behaviour as for shutting down the whole connection. Would be a simple fix like this:
|
@siewp that works if the RabbitMQ connection is shutdown (and possibly I could save some code by using that), but in my testing it doesn't work when Vertx itself shuts down, I still need the VertxInternal#addCloseHook. |
Version
4.5.7
Context
While shutting down (e.q. when a quarkus app is restarted in dev mode), the client tries to reconnect to a queue, because
io.vertx.rabbitmq.impl.QueueConsumerHandler#handleShutdownSignal
calls a shutdownHandler defined on a queue, which is:so the queue starts to reconnect on shudown, which causes an exception, and in my case, second live connection to RabbitMQ server (and eventually a third one which I don't know where came from).
The exception:
Do you have a reproducer?
No
Steps to reproduce
Extra
The text was updated successfully, but these errors were encountered: