-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'key' in message received via Consumer hasn't been decoded. #702
Comments
Is the parsing code here? kafka-node/lib/protocol/protocol.js Lines 156 to 161 in 7be0e1c
.word32bs('key')
.tap(function (vars) {
if (vars.key === -1) return;
cur += vars.key;
this.buffer('key', vars.key);
}) Should we parse it as a string instead? |
We should respect the consumer's |
Should be decoded as a string now by default. Fixed in #704 and published as 2.0.0. |
Bug Report
Consumer.on('message')
, I expect themessage.key
should be a string, just as same as what I send viaProducer.send()
, however, what I got is aBuffer
Environment
v8.1.3
1.6.2
v0.10.2.1
For specific cases also provide
Include Sample Code to reproduce behavior
Include output with Debug turned on
As you can see, the
key
are in form of{"type":"Buffer","data":[104,105,103,104,107,101,121]}
, which I expect it to be a string likehighkey
.The text was updated successfully, but these errors were encountered: