diff --git a/src/kafka/producer.js b/src/kafka/producer.js index 5c3aa18..2b0aecc 100644 --- a/src/kafka/producer.js +++ b/src/kafka/producer.js @@ -19,6 +19,10 @@ module.exports = async (recordKey = null, record, encodedRecord = null, topic = payload = JSON.stringify(record); } + if (recordKey !== null) { + recordKey = recordKey.toString(); + } + await producer.send({ topic: topic, messages: [{