I want to create a broker " eclipse mosquitto" so many clients can connect to it and have their own topics,
For example if a client connects to broker with id "x" he can access the sub topic of "client_123456789/".
The reason is to have customers using same broker but be unable to mess with another customers data.
But according to mosquitto documents the client_id_prefixes is deprecated, any suggestions?
Thanks in advance ...
I think probably per_listener_settings should be used but im not sure how 🤔
per_listener_settings
is not what you are looking for, it allow for different configuration options to be set on the different TCP ports mosquitto listens to.
You also probably don't want to be using client ids as the topic prefix as only a single client per topic id can connect to the broker.
What you can do is prefix the topic with the username, which can be done as part of the entry in either the ACL file (set with acl_file
configuration option) or as part of the topic pattern string returned by the auth_plugin (e.g. the go auth plugin or the dynamic auth plugin)