Closed annlumia closed 1 year ago
Are you suggesting that you want to subscribe to topics directly on the Mochi broker side? Why would there be a need to subscribe to topics on the server? If you have such a requirement, you can create your own hook plugin and handle the messages you want to subscribe to within the OnPublish() interface of the hook. You can refer to the ExampleHook in the examples directory: https://github.com/mochi-mqtt/server/blob/main/examples/hooks/main.go
I have such a need for an application I am developing, including to monitor the health status of microservices.
Hahaha, the hook seems to fit, I didn't think of it before, thanks for the suggestion.
How to subscribe to certain topics directly without using MQTT Client anymore?
As for publishing messages, I can use