publishStruct

fun publishStruct(name: String, schema: StructSchema<*>, retained: Boolean = false, properties: Map<String, Any> = emptyMap()): Int(source)

Publishes a topic that holds single values of schema, and returns its id.

Publishes the schema topics for schema and every struct type nested in it first, if they haven't been already, so a client can decode the first value.

Throws

if a different schema with the same type name was already published