setStruct

fun <T> setStruct(id: Int, schema: StructSchema<T>, value: T, timestampMicros: Long = now())(source)

Sets the value of a topic published with publishStruct, packing value with schema.

Throws

if the topic isn't a struct topic for schema

if schema packs a different number of bytes than it declares