requirePartitions

fun requirePartitions(partitions: Int): Int

Returns partitions when it is a valid partition count (isValidPartitions); fails with an IllegalArgumentException that says why otherwise. Every log, command topic and host configuration checks its partition count with it at start.