Partitioners do not receive list of partitions parameter and as the result: CyclicPartitioner always returns 0 KeyedPartitioner and RandomPartitioner fail
call client.refreshMetadata([topic1, topic2], callback) before sending.
client.refreshMetadata([topic1, topic2], callback)
Most helpful comment
call
client.refreshMetadata([topic1, topic2], callback)before sending.