Skip to content

Commit

Permalink
YAR-14287: cast kafka key to string bc of kafkajs limitation (Materia…
Browse files Browse the repository at this point in the history
  • Loading branch information
chuck-alt-delete authored and Andre Rosa committed Feb 12, 2024
1 parent 6cefb6d commit fdba6de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/kafka/producer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [{
Expand Down

0 comments on commit fdba6de

Please sign in to comment.