kafka-streams
kafka-streams copied to clipboard
Skip key only if it's not buffer
Hi
@polovi can you add a little bit more context about this change. It seems more counterintuitive for me but we would love to get more info about this in order to help you mitigate this problem.
Hi,
in function mapBufferKeyToString
it never convert key as Buffer to string because it return object as it is in condition
if (Buffer.isBuffer(object.key)) {
return object;
}
It should skip these condition if key is Buffer and continue to conversion
try {
const key = object.key.toString("utf8");
if (key) {
object.key = key;
}
} catch (_) {
//empty
}