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
on_client_offline not triggered by shutdown anymore #2003
Comments
@bohlenc Nothing was implemented to change behaviour within VerneMQ. So this must be related to Kubernetes (where there were changes to the start script). This is somewhat difficult to reason about. Verne, hooks, plugin all run in the same VM. Question of Shutdown order, time, guarantees. You could test what 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
Just to be clear: I see this issue also in a simple Docker container, so it does not seem to be Kubernetes related - but I will check in the direction of |
I found that before Should the hook not be triggered regardless of how the session is terminated? |
I assume client sessions are not terminated on Nevertheless, until the node is back up, the clients are actually offline and shouldn't in that case trigger the |
Environment
vernemq/vernemq:1.12.x
vernemq.conf
):Expected behaviour
I expect the
on_client_offline
hook to be called when a client session is terminated because of a node shutdown.This was the case up until and including version 1.11.0.
Actual behaviour
The
on_client_offline
hook is not called anymore in version 1.12.0 in later when the node is shutdown.Additional information
I compared the VerneMQ log output of versions 1.11.0 and 1.12.3, when shutting down a node (i.e. by killing the container it runs in).
(The
[info]
messages are printed usingon_client_wakeup
andon_client_offline
hooks)Output with version
1.11.0
:(->
on_client_offline
hook is triggered)Output with version
1.12.3
:(->
on_client_offline
hook is not triggered)So it seems 1.12.0 introduced a new behavior regarding how sessions are terminated on shutdown, or maybe how a SIGTERM is handled.
The text was updated successfully, but these errors were encountered: