publish
Publishes a topic and returns its id, or returns the id of the topic with this name if it is already published.
Clients subscribed to a matching name are told about the topic right away.
Parameters
The topic name, conventionally starting with /. Names starting with $ are reserved for the server.
Whether the topic should stay announced when nothing is publishing to it.
Other topic properties, such as unit, announced to clients. Values are strings, booleans or finite numbers. They are ignored if the topic is already published.
Throws
if the name is empty or reserved, the name has ever been published with a different type, or a property value is of another kind. A name keeps its type for as long as this server object exists, even after unpublish, because dashboards keep a field's first type and refuse values of another.
Publishes a topic of type. See the overload that takes a type string.