When useShutdownHook=true, the broker registers a shutdown hook with the jvm
from which it calls broker.stop(). If the jvm is shutdown before the broker is stopped, then it will do a clean shutdown as part of the jvm callback. It is always better to do a clean stop of the broker because it will ensure a speedy restart as all in-memory data will have been checkpointed.
If an application or container wants to manage broker shutdown via a shutdown hook, such that it can control the shutdown order of components, it should disable the broker hook, which defaults to true.